Skip to content

Provide a script and cookbook recipe to convert a Lua modulefile tree into Tcl modulefiles #711

Open

Description

@xdelaruelle

Sites running Lmod have their software stack described as Lua modulefiles. When such a site evaluates a switch to Modules, or wants to make its modulefiles usable by both tools, the first obstacle is the modulefile language: Modules evaluates Tcl modulefiles only, so an existing Lua tree cannot be reused as is. Rewriting hundreds or thousands of modulefiles by hand is a strong deterrent, and feedback gathered at the HPSF Conference 2026 confirmed this is a recurring blocker for sites interested in trying Modules.

The need is twofold:

  • A conversion script that takes a Lua modulefile tree and produces the equivalent Tcl modulefile tree. It should handle the common Lmod modulefile functions (setenv, prepend_path, append_path, load, depends_on, prereq, conflict, family, whatis, help, LmodMessage, etc.) and map them to their Tcl modulefile command counterparts. Constructs with no direct equivalent should be reported clearly rather than silently dropped, so the site knows what remains to be adapted by hand. Lmod-specific tree conventions such as .modulerc.lua, .version and default symlinks should also be translated.

  • A cookbook recipe documenting the migration path: how to run the conversion, what gets translated automatically, what the known gaps are, how to review and test the generated Tcl modulefiles, and how to organize the result so that a site can validate Modules against its real software stack before committing to it.

This would lower the entry cost for Lmod sites wanting to evaluate or adopt Modules and would give a documented, repeatable answer to a question that regularly comes up from the community.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions