TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
503 stars 128 forks source link

`module keyword` does not search module help, as documented #736

Open malcook opened 1 week ago

malcook commented 1 week ago

Notes

I read in your documentation about module keyword that:

This will search any help message or whatis description for the word(s) given on the command line.

But I find that it does not search the content of lua help at all.

Example:

$ module spider git

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  git: git/2.38.1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Description:
      Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

    This module can be loaded directly: module load git/2.38.1

    Help:
       This module exposes the following command(s):
         - git-receive-pack
         - scalar
         - git
         - git-shell
         - git-upload-archive
         - git-subtree
         - git-upload-pack
         - git-cvsserver

so far, so good. I can search for something in the 'whatis' section of the .lua file just fine:

$ module keyword "distributed version"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following modules match your search criteria: "distributed version"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  git: git/2.38.1
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

however, searching for something in the "help" section fails:

$ module keyword git-subtree
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following modules match your search criteria: "git-subtree"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To learn more about a package execute:

   $ module spider Foo

where "Foo" is the name of a module.

To find detailed information about a particular package you
must specify the version if there is more than one version:

   $ module spider Foo/11.1

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Might this be a configuration issue on my side, or is the documentation incorrect?

I am running

$ module --version

Modules based on Lua: Version 8.7.49 2024-08-30 13:55 -06:00
    by Robert McLay mclay@tacc.utexas.edu

I have developed a workaround using ripgrep, but feel this is worth reporting.

rtmclay commented 6 days ago

Thanks for the bug report. I have modified the IS690-hide branch to provide a fix for this. Please test this branch to see if it works for you.

malcook commented 6 days ago

Thanks!

My own quick review suggests that the change of line 252 in Spider.lua should prove to be exactly what I hoped for.

However, I don't think I can easily test it myself now, but I have advised my site admin of the availability of change. He may chime in here.

I look forward to the release. It will make a big difference to me and my colleagues.