Closed Bug 1900312 Opened 1 year ago Closed 1 year ago

FOG: Warning generated on Rust code when keys use CamelCasing

Categories

(Toolkit :: Telemetry, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: janerik, Assigned: janerik)

References

Details

Attachments

(1 file)

[task 2024-05-30T16:11:45.075Z] 16:11:45     INFO -  45781 |           pub brokenAddBlockers: AsyncShutdownTimeoutObjectItemBrokenaddblockers,
[task 2024-05-30T16:11:45.075Z] 16:11:45     INFO -        |               ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `broken_add_blockers`
[task 2024-05-30T16:11:45.076Z] 16:11:45     INFO -        |

should be broken_add_bockers

Ah! I realized that the original code had the brokenAddBlockers casing in the metrics.yaml. We don't change casing for names in the structure.
But we can add the annotation that makes the warning go away.

Summary: FOG: Wrong casing generated for object metric types → FOG: Warning generated on Rust code when keys use CamelCasing

This means CamelCasing (or any other casing) for structure fields is now possible
without Glean transforming those names in any way.
Note that the generated Rust code will have the same CamelCase naming,
which might be unusual.
JavaScript will also need to pass in the object fields exactly as
written in the corresponding metrics.yaml definition.

Pushed by jrediger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e706d009236 Add allow-lint annotation to generated code r=TravisLong
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: