Skip to content

install: add --enable-like-lmod configure option - #744

Merged
xdelaruelle merged 1 commit into
envmodules:mainfrom
xdelaruelle:like-lmod
Nov 19, 2026
Merged

xdelaruelle merged 1 commit into
envmodules:mainfrom
xdelaruelle:like-lmod

Conversation

@xdelaruelle

Copy link
Copy Markdown
Collaborator

Add the --enable-like-lmod installation option, which enables at once all the options making the module command behave similarly to Lmod. These behaviors already exist in Modules but are disabled by default, each behind its own installation option, so sites migrating from Lmod or providing both tools had to find and set them one by one.

The option is equivalent to the cumulative use of:

  • --with-abort-on-error=load:ml:reload:switch: a failed module evaluation aborts the whole load or switch command
  • --enable-conflict-unload: conflicting modules are automatically unloaded (Lmod autoswap)
  • --enable-require-via: the module enabling a modulepath is a requirement of the modules loaded from it (Lmod module hierarchy)
  • --enable-unique-name-loaded: only one module loaded per module name (Lmod one name rule)
  • --enable-path-entry-reorder: a path entry added again is moved to its new position
  • --with-search-match=contains: avail matches modules whose name contains the query
  • --with-sticky-purge=warning: purge keeps sticky modules loaded without raising an error

Like --enable-new-features, an installation option set after --enable-like-lmod on the command line supersedes the value it defines, and --disable-like-lmod has no effect.

The option is documented in INSTALL.rst, mentioned in the Lmod section of the Other module implementations document and added to the release notes.

Several behaviors Lmod users expect exist in Modules but are disabled
by default, each behind its own installation option. Sites migrating
from Lmod, or providing both tools, had to find and set them one by
one.

The new option sets them all at once: abort on error on load and
switch sub-commands, conflict unload, require via, unique name loaded,
path entry reorder, contains search match and sticky purge reported as
a warning. Like --enable-new-features, an option set after it on the
command line supersedes the value it defines.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
@xdelaruelle
xdelaruelle merged commit 4a959a0 into envmodules:main Nov 19, 2026
22 checks passed
@xdelaruelle
xdelaruelle deleted the like-lmod branch November 19, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant