spack/share/spack
Xavier Delaruelle 41d7fe0a50
modules tcl: fix autoload mechanism in template (#36237)
Adapt tcl modulefile template to call "module load" on autoload
dependency without testing if this dependency is already loaded or not.

The is-loaded test is not necessary, as module commands know how to cope
with an already loaded module. With environment-modules 4.2+ (released
in 2018) it is also important to have this "module load" command even if
dependency is already loaded in order to record that the modulefile
declares such dependency. This is important if you want to keep a
consistent environment when a dependent module is unloaded.

The "Autoloading" verbose message is also removed as recent module
commands will report such information to the user (depending on the
verbosity configured for the module command).

Such change has been test successfully with Modules 3.2 (EL7), 4.5 (EL8)
and 5.2 (latest) and also with Lmod 7 and 8 (as it is mentionned in
Spack docs that Lmod can be used along with tcl modules). Dependencies
are correctly loaded or unloaded, whether they are loaded/unloaded or
not.

This change fixes Tcl quoting issue introduced in #32853.

Fixes #19155.
2023-03-20 09:23:40 +01:00
..
bash license year bump (#34921) 2023-01-18 14:30:17 -08:00
bootstrap Update metadata for bootstrapping (#33665) 2022-11-03 09:05:03 +00:00
csh license year bump (#34921) 2023-01-18 14:30:17 -08:00
docker license year bump (#34921) 2023-01-18 14:30:17 -08:00
docs/docker/module-file-tutorial license year bump (#34921) 2023-01-18 14:30:17 -08:00
gitlab Update the PyTorch ecosystem (#36132) 2023-03-17 10:13:44 +01:00
keys update tutorial command for v0.18.0 and new gpg key (#30904) 2022-05-28 02:36:20 +00:00
logo add artisanal handcrafted SVG Spack logo. (#6165) 2017-11-06 22:42:16 -08:00
qa Style: black 23, skip magic trailing comma (#35351) 2023-02-16 23:06:12 -06:00
templates modules tcl: fix autoload mechanism in template (#36237) 2023-03-20 09:23:40 +01:00
setup-env.csh license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-env.fish license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-env.ps1 license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-env.sh license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-tutorial-env.sh license year bump (#34921) 2023-01-18 14:30:17 -08:00
spack-completion.bash concretizer: add mode to reuse dependencies only (#30990) 2023-03-14 09:22:20 +01:00