Repository navigation
fix(stack): refuse two runtime versions in one toolchain - #12
Merged
Merged
Conversation
A foss-2026.1 fixture pins Eigen 3.4.1 from LAMMPS and Eigen 5.0.0 from SciPy-bundle. The `stack order` command still writes both builds, which `stack solve` rejects.
The `stack order` command kept Eigen 3.4.1 for LAMMPS and Eigen 5.0.0 for SciPy-bundle at foss-2026.1. The `stack solve` command rejects that closure because a runtime dependency has one version per toolchain. The order now fails and names both requesters. Side-by-side builds stay: another toolchain, a system bootstrap pair, or a build-only tool. A recipe is not repinned.
The `stack order` command refuses two runtime versions of one name at one toolchain and names both requesters. The docs say that side-by-side builds stay. They also say that a recipe is not repinned. Both points are in the how-to, the CLI reference, the format reference, and the changelog.
The default test workflow names every integration test. The new `stack order` fixture was not in that list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproducer
The fixture
fixtures/stack_order_version_conflicthas LAMMPS 2025.07 pinning Eigen 3.4.1 and SciPy-bundle 2026.06 pinning Eigen 5.0.0, both at foss/2026.1.Before, the command exits 0, writes the order file, and prints:
After, the command exits 1, writes no order file, and prints:
The
stack solvecommand on the same roots already rejects this closure, and this change leaves it as it was:What and why
The old
stack orderwrote both Eigen builds into the order.That order describes a stack
stack solvecan't install.A runtime dependency keeps one version per name at one toolchain, so no order exists for these two exact pins.
The
build_orderfunction now checks the selected closure before it sorts.It groups modules with
InstallSlots, the package key classificationstack solvealready used inline.A runtime slot with two selected modules fails when no candidate satisfies every runtime requirement that resolved into it.
The error names each requester, its requirement, and the version it resolved.
That error comes without a repin.
Picking which exact pin to drop would describe a build the easyconfig doesn't ask for, and that choice belongs to the solver.
When one requirement is unpinned and the other pins an admitted version, the order still lists both resolutions, since
stack solvecan still pick the shared version.Two builds of one name still stay side by side where EasyBuild installs them that way:
Docs record the refusal and the CMake and binutils builds that stay.
The edits touch the CHANGELOG, the solve-lock how-to, the CLI and formats references, and
llms-full.txt.The test workflow now runs
--test stack_order_version.Tests
cargo fmt --all --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked --all-targetspython3 scripts/gen-llms-txt.py --checksphinx-build -W --keep-goingafter the Org export andscripts/gen-rust-api.shNew tests:
two_runtime_versions_of_one_dependency_are_refusedtwo_build_only_versions_of_one_tool_both_appeara_system_bootstrap_pair_still_orders_both_versionsa_shared_version_is_not_repinnedtests/stack_order_version.rsRepro
Note
Medium Risk
Changes behavior of
stack orderfrom success to failure for previously accepted impossible runtime closures; core build-order logic but aligned with existing solver semantics.Overview
stack ordernow fails (exit 1, no order file) when two recipes at the same toolchain pin incompatible runtime versions of one package—matching closuresstack solvealready rejects. The error lists each requester, its requirement, and the resolved version (e.g. LAMMPS → Eigen 3.4.1 vs SciPy-bundle → Eigen 5.0.0 atfoss-2026.1).Before ordering,
build_orderrunsrefuse_disjoint_runtime_versions, grouping modules with sharedInstallSlotspackage keys fromresolvo_provider(same co-install rules as the solver). It does not repin recipes; side-by-side duplicates (multi-toolchain, system bootstrap pairs, build-only tools like two CMake versions) still order successfully.Adds fixture
fixtures/stack_order_version_conflict, unit tests, integration teststack_order_version, CI wiring, and doc/changelog updates.Reviewed by Cursor Bugbot for commit f65ea77. Bugbot is set up for automated code reviews on this repo. Configure here.