Merged
Conversation
Member
Author
|
@tgamblin from our conversation yesterday. Let me know what you think. I decided to use symlinks instead of the misc cache since it seems like a nice fit into existing functionality. |
8b3da95 to
50bce08
Compare
50bce08 to
a27c10d
Compare
a27c10d to
f560efb
Compare
johnwparent
reviewed
Oct 18, 2024
f8240eb to
cc87cad
Compare
255cad7 to
2f82e71
Compare
90ca43f to
e55530d
Compare
e55530d to
8a74e26
Compare
tgamblin
requested changes
Oct 25, 2024
Co-authored-by: Todd Gamblin <[email protected]>
tgamblin
requested changes
Nov 1, 2024
tgamblin
reviewed
Nov 4, 2024
tgamblin
reviewed
Nov 4, 2024
tgamblin
approved these changes
Nov 8, 2024
This was referenced Nov 25, 2024
fryeguy52
pushed a commit
to fryeguy52/spack
that referenced
this pull request
Dec 17, 2024
This PR adds a sub-command to `spack env` (`track`) which allows users to add/link anonymous environments into their installation as named environments. This allows users to more easily track their installed packages and the environments they're dependencies of. For example, with the addition of spack#41731 it's now easier to remove all packages not required by any environments with, ``` spack gc -bE ``` #### Usage ``` spack env track /path/to/env ==> Linked environment in /path/to/env ==> You can activate this environment with: ==> spack env activate env ``` By default `track /path/to/env` will use the last directory in the path as the name of the environment. However users may customize the name of the linked environment with `-n | --name`. Shown below. ``` spack env track /path/to/env --name foo ==> Tracking environment in /path/to/env ==> You can activate this environment with: ==> spack env activate foo ``` When removing a linked environment, Spack will remove the link to the environment but will keep the structure of the environment within the directory. This will allow users to remove a linked environment from their installation without deleting it from a shared repository. There is a `spack env untrack` command that can be used to *only* untrack a tracked environment -- it will fail if it is used on a managed environment. Users can also use `spack env remove` to untrack an environment. This allows users to continue to share environments in git repositories while also having the dependencies of those environments be remembered by Spack. --------- Co-authored-by: Todd Gamblin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a sub-command to
spack env(track) which allows users to add/linkanonymous environments into their installation as named environments. This allows
users to more easily track their installed packages and the environments they're
dependencies of. For example, with the addition of #41731 it's now easier to remove
all packages not required by any environments with,
Usage
By default
track /path/to/envwill use the last directory in the path as the name ofthe environment. However users may customize the name of the linked environment
with
-n | --name. Shown below.When removing a linked environment, Spack will remove the link to the environment
but will keep the structure of the environment within the directory. This will allow
users to remove a linked environment from their installation without deleting it from
a shared repository.
There is a
spack env untrackcommand that can be used to only untrack a trackedenvironment -- it will fail if it is used on a managed environment. Users can also use
spack env removeto untrack an environment.This allows users to continue to share environments in git repositories while also having
the dependencies of those environments be remembered by Spack.