Skip to content

NeXus hint: version-neutral (libNeXus before McCode#2895, HDF5 after) - #406

Merged
g5t merged 3 commits into
mainfrom
nexus-hint-version-neutral
Nov 11, 2026
Merged

g5t merged 3 commits into
mainfrom
nexus-hint-version-neutral

Conversation

@willend

@willend willend commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Refs #405.

The --verbose hint printed after embedding the runtime said Compile with flags '-DUSE_NEXUS -lNeXus'. That's right for every McCode release so far. It stops being right once mccode-dev/McCode#2895 is released, because NeXus builds then link only HDF5. The classic code generator now says -lhdf5 (ADR in McCode: docs/GRAMMAR/ADR-records/ADR_20261027_NEXUS_HDF5_COGEN_HINTS.md).

mccode-antlr embeds the runtime of whichever McCode version it resolves, so neither literal is right for every user. This PR makes the hint version-neutral: -DUSE_NEXUS plus the configured flags.nexus. A comment notes which library each runtime needs.

Changing the default flags.nexus in platforms.yaml according to the runtime version is the rest of #405. It waits for the McCode release number that includes #2895.

Only a log message changes, so generated code is unchanged. No test checks the text; the file compiles. The test suite was not run.

🤖 Generated with Claude Code

Refs #405

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/mccode_antlr/translators/c.py Resolved
Comment thread src/mccode_antlr/translators/c.py Resolved
@g5t
g5t merged commit 9a04f28 into main Nov 11, 2026
14 checks passed
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.

2 participants