Skip to content

generate-spec-types.py --check fails on main, and --apply deletes the SIGMA and DAX descriptions #435

Description

@djwaldo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions