Skip to content

module reload changes path ordering #431

@ben-bowers

Description

@ben-bowers

Describe the bug

Path ordering is different before and after a module reload, which was unexpected.

To Reproduce

Steps to reproduce the behavior:

$ echo $MYPATH

$ module load FOOFOO
Loading FOOFOO
  Loading requirement: BARBAR
$ echo $MYPATH
/home/BAR:/home/FOO
$ module reload
$ echo $MYPATH
/home/FOO:/home/BAR

Location and content of any modulerc or modulefile involved:

$ cat FOOFOO
#%Module1.0 # -*- tcl -*-
prepend-path MYPATH /home/FOO
module load BARBAR

$ cat BARBAR
#%Module1.0 # -*- tcl -*-
prepend-path MYPATH /home/BAR

Expected behavior

$MYPATH path variable consistent before and after reload

Error and debugging information

$ module --debug <command1> <arguments>
$ module --debug <command2> <arguments>
...

Modules version and configuration

$ module --version
Modules Release 5.0.0 (2021-09-12)
# The same behavior exists in 4.3.x, 4.5.x and 4.6.x as well.

Additional context

It is worth noting that if all prepend-paths above are changed to append-path then the same ordering issue occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions