Skip to content

Support spack --config-scope <env>#45046

Merged
tgamblin merged 1 commit intodevelopfrom
hs/feature/dash-C-for-env-config
Jul 7, 2024
Merged

Support spack --config-scope <env>#45046
tgamblin merged 1 commit intodevelopfrom
hs/feature/dash-C-for-env-config

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Jul 4, 2024

Depends on #45044

Support spack -C <env|dir>, with the following precedence:

  1. Named environment <env>
  2. Anonymous environment in <dir>
  3. Generic config in <dir>

This allows you to use an environment as a config scope without activating it,
which is useful when you don't want commands to be environment aware. For
example:

spack -C my_env find shows specs from the database and upstreams configured
in the env, without limiting the results to concrete specs in the environment.

@spackbot-app spackbot-app bot added commands compilers core PR affects Spack core functionality environments tests General test capability(ies) shell-support labels Jul 4, 2024
@haampie haampie changed the title Support spack --config-scope <env> Support spack --config-scope <env> Jul 4, 2024
Precedence:

1. Named environment
2. Anonymous environment
3. Generic directory
@haampie haampie force-pushed the hs/feature/dash-C-for-env-config branch from 1f1432e to a606cee Compare July 5, 2024 10:47
@tgamblin tgamblin added this to the v0.23.0 milestone Jul 5, 2024
Copy link
Copy Markdown
Member

@tgamblin tgamblin left a comment

Choose a reason for hiding this comment

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

All the config scope stuff LGTM -- only one minor change request.

Copy link
Copy Markdown
Member

@tgamblin tgamblin left a comment

Choose a reason for hiding this comment

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

approving and will fix help string in separate PR

@tgamblin tgamblin merged commit 8a430f8 into develop Jul 7, 2024
@tgamblin tgamblin deleted the hs/feature/dash-C-for-env-config branch July 7, 2024 05:02
hariharan-devarajan pushed a commit to hariharan-devarajan/spack that referenced this pull request Jul 10, 2024
Precedence:

1. Named environment
2. Anonymous environment
3. Generic directory
FrederickDeny pushed a commit to FrederickDeny/spack that referenced this pull request Aug 26, 2024
Precedence:

1. Named environment
2. Anonymous environment
3. Generic directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands compilers core PR affects Spack core functionality environments shell-support tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants