Skip to content

only use modules.yaml from recipe#275

Merged
bcumming merged 9 commits intomainfrom
fix-modules-fallback
Nov 26, 2025
Merged

only use modules.yaml from recipe#275
bcumming merged 9 commits intomainfrom
fix-modules-fallback

Conversation

@albestro
Copy link
Contributor

@albestro albestro commented Nov 24, 2025

Fix #274

Changelog:

  • fix path for modules.yaml default (continue reading for more details)
  • no more default modules.yaml provided
  • config:modules deprecated: it can still be specified, but with a warning message
  • added consistency check of config:modules and existence of modules.yaml file in recipe
  • make modules optional, i.e. do not even copy files when config:modules:false
  • doc updates

According to PR51162 the file is still in spack/etc but it has been moved from defaults to defaults/base.

  • What to do about pre/post change differences/version compatibilities? (AFAICT [email protected] is post-change)
  • Verify why modules.yaml fallback is used when config:modules:false
  • Should we switch config:modules default to false? Or should we completely remove it?

@albestro albestro force-pushed the fix-modules-fallback branch from bcf7279 to 551f33d Compare November 25, 2025 13:06
- modules.yaml must be provided if config:modules:true
- add consistency check config:modules vs modules.yaml in recipe
- minimal refactoring
Copy link
Member

@bcumming bcumming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I have one small fix in the docs.

Shall we remove config:modules in another PR? I would be happy to do it in this one.

@albestro albestro force-pushed the fix-modules-fallback branch from bcfe222 to d10703e Compare November 26, 2025 10:07
@albestro albestro marked this pull request as ready for review November 26, 2025 10:09
@albestro albestro requested a review from bcumming November 26, 2025 10:09
@albestro
Copy link
Contributor Author

As suggested by @bcumming, I checked if the modules view was generated or not in the different cases

recipe-without-modules

[daint][ialberto@daint-ln003 recipe-without-modules]$ uenv start ./store.squashfs
(paraview)[daint][ialberto@daint-ln003 recipe-without-modules]$ uenv status
paraview:/user-environment
  ParaView for Alps Grace-Hopper clusters using EGL
  views:
    spack: configure spack upstream
(paraview)[daint][ialberto@daint-ln003 recipe-without-modules]$ ls -l /user-environment/meta/recipe/
total 2
-rw-r--r-- 1 nobody nobody  21 Nov 26 12:25 compilers.yaml
-rw-r--r-- 1 nobody nobody 301 Nov 26 12:25 config.yaml
-rw-r--r-- 1 nobody nobody  91 Nov 26 12:25 environments.yaml
-rw-r--r-- 1 nobody nobody 459 Nov 26 12:25 fake.yaml

recipe-with-modules

[daint][ialberto@daint-ln003 recipe-with-modules]$ uenv start ./store.squashfs
(paraview)[daint][ialberto@daint-ln003 recipe-with-modules]$ uenv status
paraview:/user-environment
  ParaView for Alps Grace-Hopper clusters using EGL
  views:
    spack: configure spack upstream
    modules: activate modules
(paraview)[daint][ialberto@daint-ln003 recipe-with-modules]$ ls -l /user-environment/meta/recipe/
total 4
-rw-r--r-- 1 nobody nobody   21 Nov 26 12:34 compilers.yaml
-rw-r--r-- 1 nobody nobody  372 Nov 26 12:34 config.yaml
-rw-r--r-- 1 nobody nobody   91 Nov 26 12:34 environments.yaml
-rw-r--r-- 1 nobody nobody 1582 Nov 26 12:34 modules.yaml

@bcumming bcumming changed the title core: default modules.yaml configuration file has been moved in spack root only use modules.yaml from recipe Nov 26, 2025
@bcumming bcumming merged commit c912c25 into main Nov 26, 2025
4 checks passed
@albestro albestro deleted the fix-modules-fallback branch November 26, 2025 14:38
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.

Problem with modules.yaml not found after spack config related changes

2 participants