Just installed it, seems to work well.
I like that bash and zsh init scripts no longer export variables/functions.
I see you made this change to the source command in 5.2 (which is wonderful):
* Make source sub-command accepts modulefile specification as argument. If argument does not correspond to a file path, search it among available modulefiles. (fix issue #424)
And, as I think about it, maybe source as a command is a bad thing - as it doesn't really say what the command does (and it is confusing with the tcl source command).
Maybe the command should be loadsu - short for load Sneakily and Unconditionally (which is what source really does).
Sneakily - it doesn't update any values that say it is loaded.
Unconditionally - it loads the module, even if it is already loaded.
So maybe these two commands should be added:
loadu - Load Unconditionally (module loads, even if already loaded - not the same as force).
loadsu - Load Sneakily and Unconditionally
unloadsu - should be a no-op
unloadu - should be the same as unload
source - should become a depreciated alias for loadsu
Or perhaps --sneaky and --uncond(itionally) should be options to the load command.
Since these are just wild thoughts, I leave it up to you to determine if these changes would be a good idea.
Anyway:
It is nice to not have to change the init/bash and init/zsh scripts when I install modules.
And to only have to make one very minor change to modulecmd.tcl to use the source command in module files:
That is, remove "source" (actually " - source" from this block:
# some commands can only be called from top level, not within modulefile
switch -- $command {
path - paths - autoinit - help - prepend-path - append-path -\
remove-path - is-loaded - is-saved - is-used - is-avail -\
info-loaded - clear - sh-to-mod - edit - refresh - source - state -\
lint - mod-to-sh - reset - stash - stashpop - stashrm - stashshow -\
stashclear - stashlist {
knerror "${msgprefix}Command '$command' not supported$tryhelpmsg"
}
}
By changing it to:
# some commands can only be called from top level, not within modulefile
switch -- $command {
path - paths - autoinit - help - prepend-path - append-path -\
remove-path - is-loaded - is-saved - is-used - is-avail -\
info-loaded - clear - sh-to-mod - edit - refresh - state -\
lint - mod-to-sh - reset - stash - stashpop - stashrm - stashshow -\
stashclear - stashlist {
knerror "${msgprefix}Command '$command' not supported$tryhelpmsg"
}
}
On 11/8/2022 12:15 AM, Xavier Delaruelle wrote:
> Hello All,
>
> Modules 5.2 is out! As usual many new features added: Optional
> requirements, Linting modulefiles, mod-to-sh sub-command, Initial
> environment, Stashing environment and Siteconfig hook variables.
>
> Details on the major changes included in this new release are provided
> in the MIGRATING document. The list of all changes made in this new
> version are described in the NEWS document.
>
> http://modules.readthedocs.io/en/stable/MIGRATING.html
> http://modules.readthedocs.io/en/stable/NEWS.html
>
> The tarball of this new version can be downloaded at:
>
> http://downloads.sourceforge.net/modules/modules-5.2.0.tar.gz
>
> The zipball to install this new version on Windows platform can be
> downloaded at:
>
> http://downloads.sourceforge.net/modules/modules-5.2.0-win.zip
>
> If you encounter any issue, please let us know by creating a ticket on
> the project bug tracker at:
>
> https://github.com/cea-hpc/modules/issues
>
> I would like to thanks all of you who improve Modules by reporting
> bugs or sharing new ideas and more specifically Adrien Cotte, Jan
> Macku and Lukáš Zaoral for their contribution to this new version.
>
> Best regards,
> Xavier
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
|