Skip to content

Built-In Recursive Module Loading #2982

@citibeth

Description

@citibeth

@Exteris @tgamblin @alalazo

The only option left is to make environment modules, but these lose dependency information...
Can we modify our modules to also load dependencies as well? I thought that
worked? Or is that only for Lmod?
I think if the modules shipped with a configuration with... prereq loading enabled by default, that would be way better.

Currently, setting up recursive loading of modules requires users add per-package information in modules.yaml. This is fundamentally the wrong place (see #1662). Which dependencies need to be loaded recursively is package-specific, and should therefore go with all other package-specific things (in package.py).

How to fix:

  1. Design and implement a mechanisms that allows packagers to add recursive module loading information to package.py. Is this an optional kwarg on depends_on()?

  2. Design a setting in modules.yaml to be able to turn package auto-loading on/off; or even override what is in package.py on a per-package basis.

  3. Modify the module generation logic to incorporate recursive-loading information from the packages, as well as its current source of modules.yaml.

  4. Add default rules to some Package superclasses. For example, PythonPackage should auto-load its dependencies by default, whereas AutotoolsPackage and CMakePackage do not.

  5. Successively refine by adding more detailed information on recursive module loading, by editing package.py files on a per-package basis.

I believe this issue needs to be fixed before we see widespread use of recursive module loading among typical Spack users. Nobody wants to configure how 50 modules handle recursive loading --- especially since they likely don't even know the correct configuration for most of those modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions