-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #12228: make environments and --config-scope work #14608
Fix #12228: make environments and --config-scope work #14608
Conversation
Thanks @ChristianTackeGSI , I've been swamped with other work and stopped using spack environments for several reasons, so this issue fell down my priority list. |
It looks like I should create some unit tests? I have looked into calling |
You can have a look at tests in the |
@alalazo |
@alalazo any more suggestions on testing this? |
spack#12228 --config-scope incompatible with environments The issue has all the relevant details. Basicly an activated environment and --config-scope do not work together. The fix is by Tim Fuller @tjfulle who gets all the credit for analyzing the problem and suggesting this fix. The fix looks reasonable to me, so I decided to create a PR from it.
4adc347
to
7f99f98
Compare
Close/reopen to restart tests |
Thanks @ChristianTackeGSI and @tjfulle for working on this! |
Thanks @scheibelp ! :-) |
…pack#14608) Spack did not support usage of the `--config-scope` option in combination with an environment: In `lib/spack/spack/main.py`, `spack.config.command_line_scopes` is set equal to any config scopes passed by the `--config-scope` option. However, this is done after activating an environment. In the process of activating an environment, the `spack.config.config` singleton is instantiated, so later setting of `spack.config.command_line_scopes` is ignored. This commit sets command line scopes before activating an environment to ensure that they are included in the configuration. Co-authored-by: Tim Fuller <tjfulle@sandia.gov>
…pack#14608) Spack did not support usage of the `--config-scope` option in combination with an environment: In `lib/spack/spack/main.py`, `spack.config.command_line_scopes` is set equal to any config scopes passed by the `--config-scope` option. However, this is done after activating an environment. In the process of activating an environment, the `spack.config.config` singleton is instantiated, so later setting of `spack.config.command_line_scopes` is ignored. This commit sets command line scopes before activating an environment to ensure that they are included in the configuration. Co-authored-by: Tim Fuller <tjfulle@sandia.gov>
…pack#14608) Spack did not support usage of the `--config-scope` option in combination with an environment: In `lib/spack/spack/main.py`, `spack.config.command_line_scopes` is set equal to any config scopes passed by the `--config-scope` option. However, this is done after activating an environment. In the process of activating an environment, the `spack.config.config` singleton is instantiated, so later setting of `spack.config.command_line_scopes` is ignored. This commit sets command line scopes before activating an environment to ensure that they are included in the configuration. Co-authored-by: Tim Fuller <tjfulle@sandia.gov>
fixes #12228
The issue has all the relevant details. Basically an activated environment and
--config-scope
do not work together.The fix is by Tim Fuller @tjfulle who gets all the credit for analyzing the problem and suggesting this fix.
The fix looks reasonable to me, so I decided to create a PR from it.