summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2024-10-28 19:28:03 -0700
committerGitHub <noreply@github.com>2024-10-28 19:28:03 -0700
commite81ce18cade3a9824e5c28cf78c99e3836241b4d (patch)
tree4222287bedea97b0aa31547fcff7cd0498c3c99d /share
parentd48d993ae7b90ae332111e8c68326fa50243efb5 (diff)
downloadspack-e81ce18cade3a9824e5c28cf78c99e3836241b4d.tar.gz
spack-e81ce18cade3a9824e5c28cf78c99e3836241b4d.tar.bz2
spack-e81ce18cade3a9824e5c28cf78c99e3836241b4d.tar.xz
spack-e81ce18cade3a9824e5c28cf78c99e3836241b4d.zip
cmd/solve: use interface from cmd/spec (#47182)
Currently, `spack solve` has different spec selection semantics than `spack spec`. `spack solve` currently does not allow specifying a single spec when an environment is active. This PR modifies `spack solve` to inherit the interface from `spack spec`, and to use the same spec selection logic. This will allow for better use of `spack solve --show opt` for debugging. --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'share')
-rw-r--r--share/spack/spack-completion.bash2
-rw-r--r--share/spack/spack-completion.fish16
2 files changed, 10 insertions, 8 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 52f8a9ea41..d8c58143c9 100644
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -1831,7 +1831,7 @@ _spack_restage() {
_spack_solve() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --show -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json -c --cover -t --types --timers --stats -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
+ SPACK_COMPREPLY="-h --help --show --timers --stats -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json --format -c --cover -t --types -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish
index 84da6412f1..afea0b1a57 100644
--- a/share/spack/spack-completion.fish
+++ b/share/spack/spack-completion.fish
@@ -2747,12 +2747,16 @@ complete -c spack -n '__fish_spack_using_command restage' -s h -l help -f -a hel
complete -c spack -n '__fish_spack_using_command restage' -s h -l help -d 'show this help message and exit'
# spack solve
-set -g __fish_spack_optspecs_spack_solve h/help show= l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json c/cover= t/types timers stats U/fresh reuse fresh-roots deprecated
+set -g __fish_spack_optspecs_spack_solve h/help show= timers stats l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json format= c/cover= t/types U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 solve' -f -k -a '(__fish_spack_specs_or_id)'
complete -c spack -n '__fish_spack_using_command solve' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command solve' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command solve' -l show -r -f -a show
complete -c spack -n '__fish_spack_using_command solve' -l show -r -d 'select outputs'
+complete -c spack -n '__fish_spack_using_command solve' -l timers -f -a timers
+complete -c spack -n '__fish_spack_using_command solve' -l timers -d 'print out timers for different solve phases'
+complete -c spack -n '__fish_spack_using_command solve' -l stats -f -a stats
+complete -c spack -n '__fish_spack_using_command solve' -l stats -d 'print out statistics from clingo'
complete -c spack -n '__fish_spack_using_command solve' -s l -l long -f -a long
complete -c spack -n '__fish_spack_using_command solve' -s l -l long -d 'show dependency hashes as well as versions'
complete -c spack -n '__fish_spack_using_command solve' -s L -l very-long -f -a very_long
@@ -2764,17 +2768,15 @@ complete -c spack -n '__fish_spack_using_command solve' -s I -l install-status -
complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -f -a install_status
complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -d 'do not show install status annotations'
complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -f -a format
-complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -d 'print concrete spec as yaml'
+complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -d 'print concrete spec as YAML'
complete -c spack -n '__fish_spack_using_command solve' -s j -l json -f -a format
-complete -c spack -n '__fish_spack_using_command solve' -s j -l json -d 'print concrete spec as json'
+complete -c spack -n '__fish_spack_using_command solve' -s j -l json -d 'print concrete spec as JSON'
+complete -c spack -n '__fish_spack_using_command solve' -l format -r -f -a format
+complete -c spack -n '__fish_spack_using_command solve' -l format -r -d 'print concrete spec with the specified format string'
complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -f -a 'nodes edges paths'
complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -d 'how extensively to traverse the DAG (default: nodes)'
complete -c spack -n '__fish_spack_using_command solve' -s t -l types -f -a types
complete -c spack -n '__fish_spack_using_command solve' -s t -l types -d 'show dependency types'
-complete -c spack -n '__fish_spack_using_command solve' -l timers -f -a timers
-complete -c spack -n '__fish_spack_using_command solve' -l timers -d 'print out timers for different solve phases'
-complete -c spack -n '__fish_spack_using_command solve' -l stats -f -a stats
-complete -c spack -n '__fish_spack_using_command solve' -l stats -d 'print out statistics from clingo'
complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command solve' -l reuse -f -a concretizer_reuse