spack load: remove --only argument (#42120)
The argument was deprecated in v0.21 and slated for removal in v0.22.
This commit is contained in:
parent
4f9fe6f9bf
commit
d390ee1902
3 changed files with 2 additions and 21 deletions
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import llnl.util.tty as tty
|
|
||||||
|
|
||||||
import spack.cmd
|
import spack.cmd
|
||||||
import spack.cmd.find
|
import spack.cmd.find
|
||||||
import spack.environment as ev
|
import spack.environment as ev
|
||||||
|
@ -70,16 +68,6 @@ def setup_parser(subparser):
|
||||||
help="load the first match if multiple packages match the spec",
|
help="load the first match if multiple packages match the spec",
|
||||||
)
|
)
|
||||||
|
|
||||||
subparser.add_argument(
|
|
||||||
"--only",
|
|
||||||
default="package,dependencies",
|
|
||||||
dest="things_to_load",
|
|
||||||
choices=["package", "dependencies"],
|
|
||||||
help="select whether to load the package and its dependencies\n\n"
|
|
||||||
"the default is to load the package and all dependencies. alternatively, "
|
|
||||||
"one can decide to load only the package or only the dependencies",
|
|
||||||
)
|
|
||||||
|
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
"--list",
|
"--list",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
@ -110,11 +98,6 @@ def load(parser, args):
|
||||||
)
|
)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if args.things_to_load != "package,dependencies":
|
|
||||||
tty.warn(
|
|
||||||
"The `--only` flag in spack load is deprecated and will be removed in Spack v0.22"
|
|
||||||
)
|
|
||||||
|
|
||||||
with spack.store.STORE.db.read_transaction():
|
with spack.store.STORE.db.read_transaction():
|
||||||
env_mod = uenv.environment_modifications_for_specs(*specs)
|
env_mod = uenv.environment_modifications_for_specs(*specs)
|
||||||
for spec in specs:
|
for spec in specs:
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ _spack_list() {
|
||||||
_spack_load() {
|
_spack_load() {
|
||||||
if $list_options
|
if $list_options
|
||||||
then
|
then
|
||||||
SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --first --only --list"
|
SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --first --list"
|
||||||
else
|
else
|
||||||
_installed_packages
|
_installed_packages
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2091,7 +2091,7 @@ complete -c spack -n '__fish_spack_using_command list' -l update -r -f -a update
|
||||||
complete -c spack -n '__fish_spack_using_command list' -l update -r -d 'write output to the specified file, if any package is newer'
|
complete -c spack -n '__fish_spack_using_command list' -l update -r -d 'write output to the specified file, if any package is newer'
|
||||||
|
|
||||||
# spack load
|
# spack load
|
||||||
set -g __fish_spack_optspecs_spack_load h/help sh csh fish bat pwsh first only= list
|
set -g __fish_spack_optspecs_spack_load h/help sh csh fish bat pwsh first list
|
||||||
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 load' -f -a '(__fish_spack_installed_specs)'
|
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 load' -f -a '(__fish_spack_installed_specs)'
|
||||||
complete -c spack -n '__fish_spack_using_command load' -s h -l help -f -a help
|
complete -c spack -n '__fish_spack_using_command load' -s h -l help -f -a help
|
||||||
complete -c spack -n '__fish_spack_using_command load' -s h -l help -d 'show this help message and exit'
|
complete -c spack -n '__fish_spack_using_command load' -s h -l help -d 'show this help message and exit'
|
||||||
|
@ -2107,8 +2107,6 @@ complete -c spack -n '__fish_spack_using_command load' -l pwsh -f -a shell
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l pwsh -d 'print pwsh commands to load the package'
|
complete -c spack -n '__fish_spack_using_command load' -l pwsh -d 'print pwsh commands to load the package'
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l first -f -a load_first
|
complete -c spack -n '__fish_spack_using_command load' -l first -f -a load_first
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l first -d 'load the first match if multiple packages match the spec'
|
complete -c spack -n '__fish_spack_using_command load' -l first -d 'load the first match if multiple packages match the spec'
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l only -r -f -a 'package dependencies'
|
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l only -r -d 'select whether to load the package and its dependencies'
|
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l list -f -a list
|
complete -c spack -n '__fish_spack_using_command load' -l list -f -a list
|
||||||
complete -c spack -n '__fish_spack_using_command load' -l list -d 'show loaded packages: same as `spack find --loaded`'
|
complete -c spack -n '__fish_spack_using_command load' -l list -d 'show loaded packages: same as `spack find --loaded`'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue