Skip to content

Tags set through prereq not updated on loaded secondary requirement #459

@xdelaruelle

Description

@xdelaruelle

On version 5.1.0, when setting tags through a prereq command defining a list of requirements (two or more), the tags are not set on already loaded or loading alternative requirements (other than the first one).

Issue can be demonstrated when loading the additional requirement when dependent module is already loaded. In this situation, the reload of the dependent module should update the tags set on the loading requirement:

$ ml show mod
-------------------------------------------------------------------
/path/to/modulefiles/mod/1.0:

prereq          --tag=foo foo/1.0 bar/1.0
-------------------------------------------------------------------
$ ml mod
Loading mod/1.0
  Loading requirement: foo/1.0
$ ml bar/1.0
Loading bar/1.0
  Unloading dependent: mod/1.0
  Reloading dependent: mod/1.0
$ ml
Currently Loaded Modulefiles:
 1) foo/1.0 <foo>   2) bar/1.0   3) mod/1.0  

Key:
auto-loaded  <module-tag>  

When more than one requirement are already loaded then we try to load the dependent module, this module only updates the tags on the first dependent module in list:

$ ml purge
$ ml foo bar
$ ml
Currently Loaded Modulefiles:
 1) foo/1.0   2) bar/1.0  
$ ml mod
$ ml
Currently Loaded Modulefiles:
 1) foo/1.0 <foo>   2) bar/1.0   3) mod/1.0  

Key:
<module-tag>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions