Skip to content

Fix indesym avail on symbol in dir without visible mod - #757

Merged
xdelaruelle merged 1 commit into
envmodules:mainfrom
xdelaruelle:avail-indesym-emptydir
Dec 3, 2026
Merged

xdelaruelle merged 1 commit into
envmodules:mainfrom
xdelaruelle:avail-indesym-emptydir

Conversation

@xdelaruelle

Copy link
Copy Markdown
Collaborator

When symbolic versions are reported as independent entries (`indesym` element in the `avail` or `spider` output configuration), a symbolic version is recorded in the content of its parent directory. If this directory only holds hidden modules, it is not part of the found elements and `getModules` raised an error when reading its properties (`can't read "found_list(...)": no such element in array`).

Such a symbolic version is now withdrawn from the result, as is already the case when symbolic versions are reported along their target (`sym` element).

Shell completion scripts query available modules with the `indesym` element, so module name completion was broken on a modulepath containing such a directory.

Tests are added for `avail` and `spider` using the existing `loc_rc010/subdir` fixture.

When symbolic versions are reported as independent entries (indesym
element in avail or spider output configuration), a symbolic version
is recorded in the content of its parent directory. If this directory
only holds hidden modules, it is not part of the found elements and
getModules raised an error when reading its properties.

Such symbolic version is now withdrawn from result, like done when
symbolic versions are reported along their target. Shell completion
scripts query available modules with indesym element, thus module
name completion was broken on modulepaths with such directory.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
@xdelaruelle
xdelaruelle merged commit ad1f10b into envmodules:main Dec 3, 2026
22 checks passed
@xdelaruelle
xdelaruelle deleted the avail-indesym-emptydir branch December 3, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant