Skip to content

Nine parity fixes for the EasyBuild parser and build order - #70

Merged
HaoZeke merged 9 commits into
mainfrom
stack/parity-fixes
Nov 20, 2026
Merged

HaoZeke merged 9 commits into
mainfrom
stack/parity-fixes

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Nine eb-stack parity fixes in one stack on main 29e253d.

The first four are the ebs-n7 kits: toolchain hierarchy (iimkl, lfbf,
gompi, GCCcore order), cudaver templates, raw string literals, and
combined versionsuffix pins with trailing-comma appends. The next five
are the ebs-n8 kits: unparenthesized tuples on an unpacking right side,
generator expressions in calls and parentheses, the CUDA suffix on the
nvidia-compilers hierarchy level, an explicit dependency toolchain in
build_order::satisfies, and EasyBuild's alternative parameter names.

Each commit carries one fragment. The ci_test.yml list gains one line
per new integration test file, because
tests/public_metadata.rs checks that every file in tests/ is listed.

EasyBuild toolchain composites such as intel and lfoss list their
individual components rather than intermediate subtoolchains like iimkl
and lfbf. Walking only downward from parent dependencies omits those
sibling composites and appends discoveries ahead of GCCcore.

Discover same-version toolchain definitions whose pins are covered by
the parent recipe, emit walked members in post-order so subtoolchains
precede parents, and keep gompi out of gfbf hierarchies.
EasyBuild recipes for NVHPC toolchains use %(cudaver)s in
toolchain.version when declaring a CUDA dependency, or inherit cudaver
from a CUDA-suffixed toolchain version without repeating CUDA in their
dependency list. Both cases left %(cudaver)s unexpanded.

Expand toolchain fields on the dependency template pass, extract cudaver
from CUDA-prefixed toolchain or versionsuffix labels when no CUDA
dependency is declared, and admit suffixed toolchain definitions when
scoping solver candidates.
Accept Python raw strings (`r'...'` / `r"..."`, including triple-quoted
forms) and raw f-strings (`rf"..."` / `fr"..."`) in `eb_parse`, keeping
backslashes verbatim while expanding `{expr}` holes inside raw
f-strings. Also teach `strip_comments` to track `\` escapes in normal
strings so escaped quotes do not prematurely end comment protection.

Raw literals were the top cause of silent `exts_list` drops across the
`easybuild-easyconfigs` `develop` corpus (188 `unknown name 'r'` errors,
including `PyStan-3.10.0-foss-2025a.eb` dropping all 6 extensions);
dropped extension lists fall from 199 to 11 across 12,222 recipes.
Accept exact `version + versionsuffix` matches in
`candidate_matches_dep_core` when `dep.versionsuffix` is unset so
`check_recipe_deps` resolves pins such as `('MCR', 'R2019b.8')` against
`MCR` (`version = 'R2019b'`, `versionsuffix = '.8'`), matching EasyBuild
and `build_order::satisfies` while continuing to reject suffixed builds
for plain version pins.

Also allow an optional trailing comma inside `list.append(...,)`
statements in `try_list_append`, eliminating all four dropped
dependency appends (`Extrae` and `Stata`) across `easybuild-easyconfigs`
`develop`.
…ect comma-separated right-hand side expressions on the same logical line inside `finish_unpack` into a `Value::Tuple` instead of stopping after the first expression.

Without comma collection, Python tuple-unpacking lines such as
`_parallel_tests, _test_type = 1, 'fast'` failed with an integer error
and left `_parallel_tests` undefined, causing four `CuPy` easyconfigs to
drop their `exts_list`.
Generalize `eval_list_comprehension` into `eval_comprehension` with a
configurable closer byte and invoke it from `parse_method_call` and
`parse_tuple_or_group` when a bracket-depth-zero `for` clause appears.

Generator expressions inside `str.join(...)` calls caused seven
`PythonBundle` easyconfigs (`AlphaPulldown` and the `jax` /
`scib-metrics` bundles) to fail with unknown loop variables and drop
their `exts_list` entries.
Append the dependency `versionsuffix` when
`derive_nvidia_family_hierarchy` reads the `nvidia-compilers` or `NVHPC`
pin from an `NVHPC` definition.

Without the suffix, `NVHPC-25.3-CUDA-12.8.0` emitted
`nvidia-compilers-25.3` rather than
`nvidia-compilers-25.3-CUDA-12.8.0`. That broke dependency lookup and
build order for `QuantumESPRESSO` (`libxc`) and `Tinker-HP` (`GSL`).
Restrict the exact module_version shortcut inside `satisfies` so it only
applies when no non-system dependency toolchain override is specified.

Without that guard, a `SYSTEM` toolchain recipe declaring an explicit
dependency toolchain, such as
`('binutils', '2.38', '', ('GCCcore', '11.3.0'))`, matched the `SYSTEM`
variant `binutils/2.38` before reaching the toolchain check.
Normalize EasyBuild's documented alternative parameter spellings such as
`version_suffix`, `version_prefix`, `deps`, and `build_deps` onto their
canonical parameter names right after parsing an easyconfig.

Recipes such as `R-crumble-0.1.2-foss-2023b-R-4.4.1.eb` declare
`version_suffix`, the alias EasyBuild accepts. That left `versionsuffix`
unset and dropped the suffix from the module name.
@HaoZeke
HaoZeke merged commit b8e87bc into main Nov 20, 2026
22 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.

1 participant