From 7e339c7b3099ed3377be0a01b08997d038bd98e5 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Thu, 19 Nov 2026 13:24:06 +0100 Subject: [PATCH] docs: strict env and dev end the evaluating shell; EESSI_VERSION does not pick the stack they load --- changelog.d/+strict-eval-and-eessi-version.doc.md | 1 + docs/orgmode/reference/cli.org | 4 ++-- docs/orgmode/reference/environment.org | 2 +- docs/reference/cli.md | 4 ++-- docs/reference/environment.md | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changelog.d/+strict-eval-and-eessi-version.doc.md diff --git a/changelog.d/+strict-eval-and-eessi-version.doc.md b/changelog.d/+strict-eval-and-eessi-version.doc.md new file mode 100644 index 0000000..63e067a --- /dev/null +++ b/changelog.d/+strict-eval-and-eessi-version.doc.md @@ -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`. diff --git a/docs/orgmode/reference/cli.org b/docs/orgmode/reference/cli.org index 25b554a..6f56a89 100644 --- a/docs/orgmode/reference/cli.org +++ b/docs/orgmode/reference/cli.org @@ -297,7 +297,7 @@ 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: @@ -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. | diff --git a/docs/orgmode/reference/environment.org b/docs/orgmode/reference/environment.org index 64a407b..ea7af98 100644 --- a/docs/orgmode/reference/environment.org +++ b/docs/orgmode/reference/environment.org @@ -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. | diff --git a/docs/reference/cli.md b/docs/reference/cli.md index eb92684..68d160a 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -299,7 +299,7 @@ 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: @@ -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. | diff --git a/docs/reference/environment.md b/docs/reference/environment.md index 38cf4de..884c623 100644 --- a/docs/reference/environment.md +++ b/docs/reference/environment.md @@ -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. |