Skip to content

missing requirement should be reported among the messages of the loading module that miss it #258

@xdelaruelle

Description

@xdelaruelle

Taking the following modulefiles as example:

$ cat /path/to/modulefiles/ta
#%Module
bad
$ cat /path/to/modulefiles/tb
#%Module
prereq ta
$ cat /path/to/modulefiles/tc
#%Module
prereq tb

Attempt to load tc will fail due to the error occurring during its requirement load. In addition to #257, where requirement load attempt should be reported, missing requirement should be stated under the message block relative to the load evaluation that miss this requirement.

$ module load --auto tc
Loading ta
  Module ERROR: invalid command name "bad"
    In '/path/to/modulefiles/ta'
    Please contact <root@localhost>

Loading tb
  ERROR: tb cannot be loaded due to missing prereq.
    HINT: the following module must be loaded first: ta

Loading tc
  ERROR: tc cannot be loaded due to missing prereq.
    HINT: the following module must be loaded first: tb

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions