Repository navigation
feat(stack): order builds against an installed module list - #15
Merged
Merged
Conversation
`stack order` walked every dependency the roots pin, including modules already on the machine. `--installed` now stops that walk at each listed module and leaves that module and its own dependencies out of the order. `--filter-deps` still drops dependencies first, and the modules that remain follow the synthetic GCC-family hierarchy.
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.
stack order against an installed module list
stack ordersequenced every dependency the roots pin.A module that was already installed still appeared in the order, and so did the dependencies that had been installed with it.
--filter-depsalready dropped named dependencies, and aGCCorGCCcorerecipe already resolved inside the synthetic GCC-family hierarchy thatrecipe hierarchy --exportprints.The order command had no way to take an installed module list.
--installedrepeats.A file is
module -t avail,module spider -t, orName/version.A directory is an Lmod tree, read the same way as
stack gap --installed.The version is the full module version (
OpenBLAS/0.3.27-foss-2025b).A bare name matches nothing.
A listed module is left out of the order, and the walk does not enter its dependencies.
--filter-depsis applied first, so a filtered dependency is not counted as a leaf.Stdout prints
installed=<N>for how many modules the walk stopped at, thenorder=<path> builds=<N>.eb_stack_ordertakes the sameinstalledlist and returns that count.Before
After
fixtures/stack_order_installed/installed.txtnamesOpenBLAS/0.3.27-foss-2025b.OpenBLAS is the leaf the walk stopped at.
The Fastest Fourier Transform in the West (FFTW) library is absent because
--filter-depsremoved it before that walk.GROMACS remains.
Tests
cargo +stable test --locked --all-targetsexited 0.The library suite reported
803 passed; 0 failed.Every other suite reported
0 failed.cargo +stable clippy --locked --all-targets -- -D warningsexited 0.cargo +stable fmt --all --checkexited 0.cargo +stable package --lockedverifiedeb_stackv0.4.0 (1533 files) and compiled the packaged crate.python3 scripts/gen-llms-txt.py --checkexited 0.python3 -m prek run -apassed trailing-whitespace, end-of-file-fixer, check-yaml, check-toml, check-merge-conflict, check-added-large-files, detect-private-key, and codespell.Repro
Note
Medium Risk
Changes core build-order graph walking and what gets emitted to order/hash files; behavior is additive but mistakes could omit required builds if installed matching is wrong.
Overview
Adds
stack order --installed(repeatable) so build orders skip modules already on the site and do not walk their dependencies, using the same module list / Lmod tree reader asstack gap --installed.--filter-depsstill runs first, so filtered deps are not treated as installed leaves.The dependency walk is implemented via
build_order_against_installed/build_graph_against_installedinbuild_order.rs, wired throughstack_orderinworkflows.rsand the CLI/MCPeb_stack_order(installedargument; JSON fieldinstalledcount). Stdout gainsinstalled=Nbeforeorder=....Docs, CHANGELOG, fixture
fixtures/stack_order_installed/installed.txt, and integration tests cover CLI/MCP parity, Lmod trees, and interaction with--filter-deps.Reviewed by Cursor Bugbot for commit c77ed27. Bugbot is set up for automated code reviews on this repo. Configure here.