Skip to content

fake modules should have a unique name #4896

@boegel

Description

@boegel

With #4868, we're now re-generating a fake module file for each extension, but we're reusing the same location and same name each time.

This is especially problematic when installing extensions in parallel, since the completion of the installation of one extension involves unloading and removing the fake module file.

While in practice there's no problem with this, mostly because Lmod doesn't care if a non-existing module file is being unloaded (which happens when another extension installation completes), it definitely not good to assume this will always be fine.

Fixing this should be easy: in ModuleGenerator.get_module_filepath, we can add some random salt to the name of the module file when fake is True, to ensure a unique module filename for every fake module.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions