From 6838ee6bb86e5ed7d9ac860731c9e24377c1e39d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 14 Sep 2023 12:25:24 +0200 Subject: Add efficient `deptype` flag and `spack.deptypes` module (#39472) This commit replaces the internal representation of deptypes with `int`, which is more compact and faster to operate with. Double loops like: ``` any(x in ys for x in xs) ``` are replaced by constant operations bool(xs & ys), where xs and ys are dependency types. Global constants are exposed for convenience in `spack.deptypes` --- share/spack/spack-completion.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index d4cb61e85d..9be1087b23 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1273,7 +1273,7 @@ complete -c spack -n '__fish_spack_using_command dependencies' -s i -l installed complete -c spack -n '__fish_spack_using_command dependencies' -s t -l transitive -f -a transitive complete -c spack -n '__fish_spack_using_command dependencies' -s t -l transitive -d 'show all transitive dependencies' complete -c spack -n '__fish_spack_using_command dependencies' -l deptype -r -f -a deptype -complete -c spack -n '__fish_spack_using_command dependencies' -l deptype -r -d 'comma-separated list of deptypes to traverse' +complete -c spack -n '__fish_spack_using_command dependencies' -l deptype -r -d 'comma-separated list of deptypes to traverse (default=build,link,run,test)' complete -c spack -n '__fish_spack_using_command dependencies' -s V -l no-expand-virtuals -f -a expand_virtuals complete -c spack -n '__fish_spack_using_command dependencies' -s V -l no-expand-virtuals -d 'do not expand virtual dependencies' @@ -1815,7 +1815,7 @@ complete -c spack -n '__fish_spack_using_command graph' -s c -l color -d 'use di complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -f -a installed complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -d 'graph installed specs, or specs in the active env (implies --dot)' complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -f -a deptype -complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -d 'comma-separated list of deptypes to traverse' +complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -d 'comma-separated list of deptypes to traverse (default=build,link,run,test)' # spack help set -g __fish_spack_optspecs_spack_help h/help a/all spec -- cgit v1.2.3-70-g09d2