Open Bug 2077154 Opened 1 month ago Updated 1 month ago

glean_parser: accept metrics files for reference only, without generating code

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: travis_, Unassigned)

References

(Blocks 1 open bug)

Details

Add a way to pass glean_parser metrics.yaml files that are used only to resolve and validate references, with no code generated for them. An application could then pass a library's metrics.yaml so that flow references to the library's events are fully validated rather than reported as unresolved. Depends on the glean_parser bug 2077133.

  • Metrics from reference-only files are used to resolve flow event references and check that each one exists, is an event, and is in_session. They are not included in generated code or generated docs.
  • References that still don't resolve remain a warning, not an error, because a flow may name an event that the library version in use doesn't define yet.
  • probe-scraper can use the same input to resolve references across library dependencies.
Blocks: 2077127
You need to log in before you can comment on or make changes to this bug.