New command: spack isolate#52500
Draft
JohnGouwar wants to merge 3 commits into
Draft
Conversation
Signed-off-by: John Gouwar <jgouwar@gmail.com>
Contributor
Author
Contributor
Author
|
@spackbot fix style |
|
Let me see if I can fix that for you! |
|
I was able to run spack style --fix==> Running style checks on spack
selected: import, ruff-format, ruff-check, mypy
==> Running import checks
lib/spack/spack/cmd/isolate.py: redundant import: spack.schema.repos
import found errors
==> Running ruff-format checks
ruff-format checks were clean
==> Running ruff-check checks
ruff-check checks were clean
==> Running mypy checks
Success: no issues found in 642 source files
mypy checks were clean
I've updated the branch with style fixes. |
Signed-off-by: John Gouwar <jgouwar@gmail.com>
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.
spack isolateaims to keep a Spack instance from writing to~/.spack. This will become easier (and more complete) after shared Spack (#52443), but this PR serves as a stopgap before that feature is merged.spack isolate ISO_PATHdoes 4 things:userscope inspack/etc/spack/include.yamlto ISO_PATH and removes theSPACK_USER_CONFIG_PATHenvironment variable for configuring it.isolatescope below thesitescope that moves thebootstrap:root,config:misc_cache,config:test_stage, andconfig:build_stageto subdirectories in ISO_PATH.spack isolate --bootstrap ISO_PATHwill also force a download of the package repo to its new location, a bootstrap build of clingo to its new location, and populate various caches (e.g. provider_cache).spack isolate ISO_PATHdoes not:~/.spackto the ISO_PATH or change the destination of explicitly set repos.SPACK_USER_CACHE_PATH. There is no config option that can be overridden.package_repository.locktoISO_PATH/reposfor the same reason as 2. Both of these will be fixed by shared Spack.isolatescope that references the absolute path of the modified user scope. Users can use environments on top of isolate to get more separate isolation.Currently, this implementation is bare bones, since it will be rewritten for shared spack. For example, it does not currently preserve comments in
include.yaml.Unit testing is in progress.