summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-11-11 09:50:07 +0100
committerGitHub <noreply@github.com>2022-11-11 00:50:07 -0800
commit0f54a63dfd33905d55de1148b2ef02cccb56b48c (patch)
tree1903b0ba9d76dfd8339d6ac4db799237bfc977f9 /share
parentf11778bb02ae7394cdc9ac24357073d76077a403 (diff)
downloadspack-0f54a63dfd33905d55de1148b2ef02cccb56b48c.tar.gz
spack-0f54a63dfd33905d55de1148b2ef02cccb56b48c.tar.bz2
spack-0f54a63dfd33905d55de1148b2ef02cccb56b48c.tar.xz
spack-0f54a63dfd33905d55de1148b2ef02cccb56b48c.zip
remove activate/deactivate support in favor of environments (#29317)
Environments and environment views have taken over the role of `spack activate/deactivate`, and we should deprecate these commands for several reasons: - Global activation is a really poor idea: - Install prefixes should be immutable; since they can have multiple, unrelated dependents; see below - Added complexity elsewhere: verification of installations, tarballs for build caches, creation of environment views of packages with unrelated extensions "globally activated"... by removing the feature, it gets easier for people to contribute, and we'd end up with fewer bugs due to edge cases. - Environment accomplish the same thing for non-global "activation" i.e. `spack view`, but better. Also we write in the docs: ``` However, Spack global activations have two potential drawbacks: #. Activated packages that involve compiled C extensions may still need their dependencies to be loaded manually. For example, ``spack load openblas`` might be required to make ``py-numpy`` work. #. Global activations "break" a core feature of Spack, which is that multiple versions of a package can co-exist side-by-side. For example, suppose you wish to run a Python package in two different environments but the same basic Python --- one with ``py-numpy@1.7`` and one with ``py-numpy@1.8``. Spack extensions will not support this potential debugging use case. ``` Now that environments are established and views can take over the role of activation non-destructively, we can remove global activation/deactivation.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash22
1 files changed, 2 insertions, 20 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 2461a0b7c7..1ed8037d2b 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -337,16 +337,7 @@ _spack() {
then
SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace --backtrace -V --version --print-shell-vars"
else
- SPACK_COMPREPLY="activate add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
- fi
-}
-
-_spack_activate() {
- if $list_options
- then
- SPACK_COMPREPLY="-h --help -f --force -v --view"
- else
- _installed_packages
+ SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize config containerize create debug dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
fi
}
@@ -838,15 +829,6 @@ _spack_create() {
fi
}
-_spack_deactivate() {
- if $list_options
- then
- SPACK_COMPREPLY="-h --help -f --force -v --view -a --all"
- else
- _installed_packages
- fi
-}
-
_spack_debug() {
if $list_options
then
@@ -1039,7 +1021,7 @@ _spack_env_depfile() {
_spack_extensions() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -l --long -L --very-long -d --deps -p --paths -s --show -v --view"
+ SPACK_COMPREPLY="-h --help -l --long -L --very-long -d --deps -p --paths -s --show"
else
_extensions
fi