TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
475 stars 122 forks source link

hide-modulefile is currently ignored #691

Open riederd opened 4 months ago

riederd commented 4 months ago

https://github.com/TACC/Lmod/blob/eb3e9119ef1ec3a17f2feb693c9dba16e1c93503/src/RC2lua.tcl#L65

The hide-modulefile function is currently ignored in TCL modules having .modulerc files since the function is a noop.

In my simple minded approach I added basic functionality to it:

proc module-hide {args} {
    set mfile [lindex $args end]
    myPuts "\{kind=\"hide_modulefile\", mfile=\"$mfile\"\},"
}

This way TCL modules with a .modulerc file containing module-hide [...] <modulefile> are not shown with module avail however they are (as expected) when using module --show_hidden avail.

Do I miss something that could cause problems with this simple "fix", or could you think to include this or something more sophisticated in future releases?

haampie commented 4 months ago

Similar: #690

riederd commented 4 months ago

True, but I'm proposing a "solution" ;-) However, since I'm new to Lmod, I don't really know if my "solution" is breaking something else.