Skip to content
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

Make spack clean env-aware #44227

Merged
merged 3 commits into from
May 24, 2024

Conversation

scheibelp
Copy link
Member

spack clean <spec> will now resolve specs based on the active environment if one is active.

If an env is active but no matching spec is found, this will fall back on fully concretizing.

@spackbot-app spackbot-app bot added commands core PR affects Spack core functionality labels May 16, 2024
@scheibelp scheibelp changed the title Features/spack clean env aware Make spack clean env-aware May 24, 2024
@scheibelp
Copy link
Member Author

It was pointed out to me that spack clean can be confusing if you mix a list of specs with --all, e.g.

spack clean zlib --all

The zlib part is redundant with --all, because --all will remove all build stages. The user in question assumed that this meant "clean everything up for zlib", but ended up clearing out stages they didn't want to by accident. This can be addressed by either:

  • (preferred for me) Forbid specifying --all or any of the other -options together with a list of specs
  • Documenting this better

@spackbot-app spackbot-app bot added the tests General test capability(ies) label May 24, 2024
@scheibelp
Copy link
Member Author

I confirmed the added tests fail without the core changes, but the test is somewhat fragile since there are other concretization pathways, like concretize._concretize_specs_together_new.

I could add a dont_concretize_at_all conftest fixture, which I think would be more robust and generally useful.

@tgamblin tgamblin merged commit 72deb53 into spack:develop May 24, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commands core PR affects Spack core functionality tests General test capability(ies)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants