Skip to content

fix(ec): drop comments the ECCodes generator cannot parse - #533

Merged
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/eccodes-abstract-comments
Jul 20, 2026
Merged

fix(ec): drop comments the ECCodes generator cannot parse#533
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/eccodes-abstract-comments

Conversation

@got3nks

@got3nks got3nks commented Jul 20, 2026

Copy link
Copy Markdown

The Flatpak job regenerates ECCodes.h from ECCodes.abstract rather than using the committed header, and #530's comments in that file made the generated header unparseable — invalid preprocessing directive #= and a truncated ECOpCodes enum — failing every Flatpak build on master (run).

Two separate ways those comments broke it:

  • The generator only treats a line as a comment when it matches ^#, i.e. with no leading whitespace. The comments inside the tag section were indented to line up with the entries, so they fell through to the data path, lost their leading tab, and had every word turned into a field.
  • It also flattens the file into a CMake list by replacing newlines with ; (abstracts/CMakeLists.txt), so a semicolon inside a comment splits the line and the fragment after it no longer starts with #. That's where the mangled ECOpCodes entry came from.

Documentation for these codes already lives in the hand-maintained ECCodes.h, so the fix is simply to keep the abstract to entries.

Verified by generating a header from the abstract before and after: master's produces 8 mangled lines and 11 compile errors, this produces none, with all seven new codes present and correct.

The Flatpak job regenerates ECCodes.h from ECCodes.abstract rather than using
the committed header, and amule-project#530's comments in that file made the generated
header unparseable — "invalid preprocessing directive #=" and a truncated
ECOpCodes enum, failing every Flatpak build on master.

Two separate ways those comments broke it:

- The generator only skips a line as a comment when it matches "^#", i.e. with
  no leading whitespace. The comments inside the tag section were indented to
  line up with the entries, so they fell through to the data path, lost their
  leading tab and had every word turned into a field.
- It also flattens the file into a CMake list by replacing newlines with ";"
  (abstracts/CMakeLists.txt), so a semicolon inside a comment splits the line
  and the fragment after it no longer starts with "#" — which is where the
  mangled ECOpCodes entry came from.

Documentation for these codes already lives in the hand-maintained ECCodes.h,
so the fix is simply to keep the abstract to entries. Verified by generating a
header from the abstract before and after: master's produces 8 mangled lines
and 11 compile errors, this produces none, with all seven new codes present.
@got3nks
got3nks merged commit c1d2465 into amule-org:master Jul 20, 2026
14 checks passed
@got3nks
got3nks deleted the fix/eccodes-abstract-comments branch July 20, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant