Repository navigation
feat(dev): --lock records what a dev environment resolved to, --locked loads it again - #333
Merged
Merged
Conversation
…d loads it again dev --lock runs the dev lines in a bash child and writes eb-local.lock: stack, EESSI version, CPU and accelerator target, and LOADEDMODULES in load order. dev --locked prints lines that purge, load exactly that list by full name, and load none of it when the shell's CPU target is not the lock's. A lock of another stack, a file that is not a lock and a name that is not a module name are refused.
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.
eb-local dev --lock MODULE...runs the dev lines in a bash child and writeseb-local.lockin the working directory, one line of JSON:{"schema_version":1,"kind":"dev-lock","stack":"EESSI/2026.06","eessi_version":"2026.06","cpu_target":"x86_64/amd/zen4","accelerator_target":"","modules":["EESSI/2026.06","GCCcore/15.2.0","FFTW/3.3.10-GCC-15.2.0","buildenv/default-GCC-15.2.0"]}modulesisLOADEDMODULESin load order, the build environment among them. Nothing is written when the lines load no module.eb-local dev --lockedprints lines that:--puredoes;EESSI_SOFTWARE_SUBDIRis not the lock'scpu_target. Node types with the same CPU target share their binaries, so a lock written on one loads on the other.Refused before any line is printed: no lock file, a file that is not a dev lock, a lock of another
stack.module, a name that is not a module name, a CPU target with characters outside[A-Za-z0-9/_.-], and a MODULE on the--lockedline.--jsonand--envrcwork with--locked.Checked
The
zigworkflow on the branch: 577 tests on x86_64 and aarch64 (575 on the branch below it). Two new tests cover writing, replacing and not writing the lock, the printed lines and their behaviour in bash on the same and on another CPU target, and each refusal. CI has no Lmod, so the tests supplyLOADEDMODULES; it has not been run against a real module environment.Closes #332