scripts/generate-spec-types.py --check fails on main, and the fix it recommends deletes documentation.
Reproduce
$ git checkout main && python3 scripts/generate-spec-types.py --check
Warning: no description for 'dialects' value 'SIGMA'
Warning: no description for 'dialects' value 'DAX'
- - "SIGMA" # Sigma Computing spreadsheet-style formula language
+ - "SIGMA"
- - "DAX" # Data Analysis Expressions (Power BI / Analysis Services)
+ - "DAX"
core-spec/spec.yaml is out of sync with core-spec/ossie-schema.json. Run --apply to fix.
$ echo $?
1
Two separate problems
1. --apply is lossy here. Descriptions come from a hardcoded map inside the script
(generate-spec-types.py:58-67), not from the schema. SIGMA and DAX are in the schema
enum but absent from that map, so the generator emits them bare — and following the script's
own advice strips the two comments spec.yaml currently has. The repair path makes the file
worse than leaving it alone.
So the script is a second source of truth: adding a dialect to ossie-schema.json also
requires hand-editing the descriptions map, or the next --apply silently removes the
description someone wrote by hand.
2. Nothing invokes it. grep -rn generate-spec-types .github/ returns no hits, and there
is no pre-commit config or Makefile target calling it. The check exists but runs nowhere, which
is why main can sit red without anyone noticing.
Suggested fix
Happy to open a PR for any of these if useful.
Found while rebasing #364; that PR touches neither file, and I confirmed the failure on a
clean extract of main rather than from my branch.
scripts/generate-spec-types.py --checkfails onmain, and the fix it recommends deletes documentation.Reproduce
Two separate problems
1.
--applyis lossy here. Descriptions come from a hardcoded map inside the script(
generate-spec-types.py:58-67), not from the schema.SIGMAandDAXare in the schemaenum but absent from that map, so the generator emits them bare — and following the script's
own advice strips the two comments
spec.yamlcurrently has. The repair path makes the fileworse than leaving it alone.
So the script is a second source of truth: adding a dialect to
ossie-schema.jsonalsorequires hand-editing the descriptions map, or the next
--applysilently removes thedescription someone wrote by hand.
2. Nothing invokes it.
grep -rn generate-spec-types .github/returns no hits, and thereis no pre-commit config or Makefile target calling it. The check exists but runs nowhere, which
is why
maincan sit red without anyone noticing.Suggested fix
SIGMAandDAXto the descriptions map so--checkpasses and--applyisnon-destructive. (
SIGMAarrived in docs(core-spec): add missing SIGMA dialect to spec.yaml enum #384,DAXalongside the Power BI work in docs(core-spec): register Power BI vendor name #413.)warning is printed and generation proceeds to drop the comment, so the failure mode is
quiet.
--checkintovalidation-ci.ymlso the gate actually gates. Without that, the samedrift returns with the next dialect.
Happy to open a PR for any of these if useful.
Found while rebasing #364; that PR touches neither file, and I confirmed the failure on a
clean extract of
mainrather than from my branch.