Skip to content

add EB option --generate-devel-module#3388

Merged
boegel merged 11 commits intoeasybuilders:developfrom
smoors:make_devel_module
Sep 4, 2020
Merged

add EB option --generate-devel-module#3388
boegel merged 11 commits intoeasybuilders:developfrom
smoors:make_devel_module

Conversation

@smoors
Copy link
Copy Markdown
Contributor

@smoors smoors commented Jul 20, 2020

this option is useful for example when creating a module in combination with --module-only and -modules-footer where the footer generates an LmodError upon loading the module.

using LmodError causes EB to fail because it tries to load the module unless make_devel_module() is skipped. skipping this function is fine in this case because the module is not supposed to be loaded anyway.

if this option is well-received I'll try to write a test for it as well.

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Jul 27, 2020

closing-reopening

@smoors smoors closed this Jul 27, 2020
@smoors smoors reopened this Jul 27, 2020
@boegel boegel added this to the 4.x milestone Aug 5, 2020
@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 5, 2020

@smoors Can you clarify the use case for this? What's the point of generating a module file you can't load?

Also, this is for using together with --force --module-only, right? Since otherwise the generated module will be loaded during the sanity check, which will result in a failure if the module can't be loaded.

I would rename it too, since it's a boolean option. It should be something like --generate-devel-module that is enabled by default, and then you can use --disable-generate-devel-module.

That being said, I think we need to re-evaluate generating those devel modules, I doubt they're actually useful at all (see also #109).

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Aug 5, 2020

@boegel my use case is discoverability:
you could make a module visible to the user e.g. when they do 'module spider' or 'module av' on the login node, without allowing them to actually load/use it on the login node itself. when the user tries to load it they then get an error message saying 'this module can only be used on this type of node'. currently we work around this by creating a LmodWarning but imho this is confusing for the users because then they have loaded a module that does not do anything, while still having loaded its dependencies.

it should indeed be used together with --force.

renaming the is fine to me, I was not happy about the name in the first place.

about the usefulness of devel modules, I never used them myself, if they work at all. maybe we can ask the community to see if anyone is using them?

@smoors smoors changed the title add EB option to skip make_devel_module() add EB option --generate-devel-module Aug 5, 2020
@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Aug 5, 2020

closing-reopening

@smoors smoors closed this Aug 5, 2020
@smoors smoors reopened this Aug 5, 2020
@easybuilders easybuilders deleted a comment from boegelbot Aug 17, 2020
@easybuilders easybuilders deleted a comment from boegelbot Aug 17, 2020
@easybuilders easybuilders deleted a comment from boegelbot Aug 30, 2020
@easybuilders easybuilders deleted a comment from boegelbot Aug 30, 2020
@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Aug 31, 2020

@boegel any objections to merging this PR?
is an additional test needed?
can we merge this now and worry about the fate of the devel modules later?

@boegel boegel modified the milestones: 4.x, next release (4.3.0) Sep 1, 2020
Comment thread easybuild/tools/options.py Outdated
@boegel boegel merged commit a4151c9 into easybuilders:develop Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants