Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/+strict-eval-and-eessi-version.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The reference says that `env --strict` and `dev --strict` end the shell that evaluates their lines when the EESSI init file is absent, and that `EESSI_VERSION` and `EESSI_CVMFS_REPO` choose only the Lmod init file for `env` and `dev`: the stack those lines load is `stack.module`.
6 changes: 3 additions & 3 deletions docs/orgmode/reference/cli.org
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ When stdout is a terminal, it also says on stderr that the lines change nothing

| Option | Meaning |
|------------+----------------------------------------------------------------------------------------------------------------------|
| =--strict= | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when =EB_LOCAL_ENV_STRICT=1=). |
| =--strict= | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when =EB_LOCAL_ENV_STRICT=1=). The =exit= is in the lines, so it ends the shell that evaluates them: meant for a job script, not an interactive shell. |
| =--json= | Print, in place of the lines, the change they make to the environment, as one line of JSON. |

With =--json=, eb-local runs the lines in a bash child and prints how that shell's environment then differs from the caller's: ={"schema_version":1,"kind":"env","set":[{"name":...,"value":...}],"unset":[...]}=, both lists sorted by name. A shell that cannot evaluate POSIX lines applies it; in nushell:

#+begin_src nu
#+begin_src text
def --env --wrapped eb [...args] {
let change = (^eb-local ...$args --json | from json)
$change.set | reduce --fold {} {|var, acc| $acc | upsert $var.name $var.value } | load-env
Expand All @@ -320,7 +320,7 @@ Print the lines =env= prints, then the lines that load the modules =dev.modules=

| Option | Meaning |
|---------------------+--------------------------------------------------------------------------------------------|
| =--strict= | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when =EB_LOCAL_ENV_STRICT=1=). |
| =--strict= | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when =EB_LOCAL_ENV_STRICT=1=). As for =env=, the =exit= ends the shell that evaluates the lines. |
| =--json= | Print the change the lines make to the environment as one line of JSON, as =env --json= does, with =kind= =dev=. |
| =--buildenv MODULE= | Load MODULE as the build environment whatever the compilers, as =dev.buildenv= does. |
| =--envrc= | Write the line that evaluates this =dev= to =.envrc= in the working directory, for direnv, and print nothing on stdout. |
Expand Down
2 changes: 1 addition & 1 deletion docs/orgmode/reference/environment.org
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The site settings, =storage.*=, =build.site_toolchains= and =build.node_types=,
| =XDG_CACHE_HOME= | Holds the RPATH wrappers, below =$XDG_CACHE_HOME/eb-local=. |
| =SLURM_JOB_ID= | The job a build runs in, whose node-local mount it uses; without it, a build and =clean --workspaces= stop. |
| =EESSI_USER_INSTALL=, =EESSI_PROJECT_INSTALL=, =EESSI_SITE_INSTALL=, =EESSI_CVMFS_INSTALL= | Choose where =eb-local eb= installs. A build clears them, and warns about one left in the shell that is not the one it sets. |
| =EESSI_CVMFS_REPO=, =EESSI_VERSION= | Name the EESSI repository (default =/cvmfs/software.eessi.io=) and version (default =2026.06=) for =eb=, =env=, =dev=, =doctor= and =list=. |
| =EESSI_CVMFS_REPO=, =EESSI_VERSION= | Name the EESSI repository (default =/cvmfs/software.eessi.io=) and version (default =2026.06=) for =eb=, =doctor= and =list=. For =env= and =dev= they name only the Lmod init file a shell without =module= sources and the file =--strict= checks; the stack those lines load is =stack.module=. |
| =EESSI_SOFTWARE_PATH=, =EESSI_SITE_SOFTWARE_PATH= | Checked by =eb-local eb= to confirm that EESSI-extend selected an install path inside the requested tree. |
| =EESSI_SOFTWARE_SUBDIR=, =EESSI_ACCELERATOR_TARGET=, =EESSI_EPREFIX= | Used by =check=, =check --dev=, =list=, =rpath-wrappers= and =doctor= to identify the loaded CPU target, accelerator and compatibility layer. |
| =LMOD_PKG=, =LMOD_CMD=, =MODULESHOME=, =MODULEPATH= | Checked by =doctor= and the emitted shell snippets to locate Lmod initialization and verify loaded module trees. |
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,12 @@ When stdout is a terminal, it also says on stderr that the lines change nothing

| Option | Meaning |
|---|---|
| `--strict` | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when `EB_LOCAL_ENV_STRICT=1`). |
| `--strict` | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when `EB_LOCAL_ENV_STRICT=1`). The `exit` is in the lines, so it ends the shell that evaluates them: meant for a job script, not an interactive shell. |
| `--json` | Print, in place of the lines, the change they make to the environment, as one line of JSON. |

With `--json`, eb-local runs the lines in a bash child and prints how that shell's environment then differs from the caller's: `{"schema_version":1,"kind":"env","set":[{"name":...,"value":...}],"unset":[...]}`, both lists sorted by name. A shell that cannot evaluate POSIX lines applies it; in nushell:

```nu
```text
def --env --wrapped eb [...args] {
let change = (^eb-local ...$args --json | from json)
$change.set | reduce --fold {} {|var, acc| $acc | upsert $var.name $var.value } | load-env
Expand All @@ -322,7 +322,7 @@ Print the lines `env` prints, then the lines that load the modules `dev.modules`

| Option | Meaning |
|---|---|
| `--strict` | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when `EB_LOCAL_ENV_STRICT=1`). |
| `--strict` | Check that the EESSI init file exists in the emitted lines and exit 2 if absent (also when `EB_LOCAL_ENV_STRICT=1`). As for `env`, the `exit` ends the shell that evaluates the lines. |
| `--json` | Print the change the lines make to the environment as one line of JSON, as `env --json` does, with `kind` `dev`. |
| `--buildenv MODULE` | Load MODULE as the build environment whatever the compilers, as `dev.buildenv` does. |
| `--envrc` | Write the line that evaluates this `dev` to `.envrc` in the working directory, for direnv, and print nothing on stdout. |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The site settings, `storage.*`, `build.site_toolchains` and `build.node_types`,
| `XDG_CACHE_HOME` | Holds the RPATH wrappers, below `$XDG_CACHE_HOME/eb-local`. |
| `SLURM_JOB_ID` | The job a build runs in, whose node-local mount it uses; without it, a build and `clean --workspaces` stop. |
| `EESSI_USER_INSTALL`, `EESSI_PROJECT_INSTALL`, `EESSI_SITE_INSTALL`, `EESSI_CVMFS_INSTALL` | Choose where `eb-local eb` installs. A build clears them, and warns about one left in the shell that is not the one it sets. |
| `EESSI_CVMFS_REPO`, `EESSI_VERSION` | Name the EESSI repository (default `/cvmfs/software.eessi.io`) and version (default `2026.06`) for `eb`, `env`, `dev`, `doctor` and `list`. |
| `EESSI_CVMFS_REPO`, `EESSI_VERSION` | Name the EESSI repository (default `/cvmfs/software.eessi.io`) and version (default `2026.06`) for `eb`, `doctor` and `list`. For `env` and `dev` they name only the Lmod init file a shell without `module` sources and the file `--strict` checks; the stack those lines load is `stack.module`. |
| `EESSI_SOFTWARE_PATH`, `EESSI_SITE_SOFTWARE_PATH` | Checked by `eb-local eb` to confirm that EESSI-extend selected an install path inside the requested tree. |
| `EESSI_SOFTWARE_SUBDIR`, `EESSI_ACCELERATOR_TARGET`, `EESSI_EPREFIX` | Used by `check`, `check --dev`, `list`, `rpath-wrappers` and `doctor` to identify the loaded CPU target, accelerator and compatibility layer. |
| `LMOD_PKG`, `LMOD_CMD`, `MODULESHOME`, `MODULEPATH` | Checked by `doctor` and the emitted shell snippets to locate Lmod initialization and verify loaded module trees. |
Expand Down
Loading