Skip to content
Snippets Groups Projects
  1. Mar 05, 2025
  2. Feb 19, 2025
  3. Nov 17, 2024
  4. Nov 14, 2024
    • Todd Gamblin's avatar
      Spec: prefer a splice-specific method to `__len__` (#47585) · 48dfa3c9
      Todd Gamblin authored
      
      Automatic splicing say `Spec` grow a `__len__` method but it's only used
      in one place and it's not clear the semantics are useful elsewhere. It also
      runs the risk of Specs one day being confused for other types of containers.
      
      Rather than introduce a new function for one algorithm, let's use a more
      specific method in the splice code.
      
      - [x] Use topological ordering in `_resolve_automatic_splices` instead of 
            sorting by node count
      - [x] delete `Spec.__len__()` and `Spec.__bool__()`
      
      ---------
      
      Signed-off-by: default avatarTodd Gamblin <tgamblin@llnl.gov>
      Co-authored-by: default avatarGreg Becker <becker33@llnl.gov>
      Co-authored-by: default avatarMassimiliano Culpo <massimiliano.culpo@gmail.com>
      48dfa3c9
    • Todd Gamblin's avatar
      `spack spec`: simplify and unify output (#47574) · e5c411d8
      Todd Gamblin authored
      
      `spack spec` output has looked like this for a while:
      
      ```console
      > spack spec /v5fn6xo /wd2p2v7
      Input spec
      --------------------------------
       -   /v5fn6xo
      
      Concretized
      --------------------------------
      [+]  openssl@3.3.1%apple-clang@16.0.0~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
      [+]      ^ca-certificates-mozilla@2023-05-30%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      ...
      
      Input spec
      --------------------------------
       -   /wd2p2v7
      
      Concretized
      --------------------------------
      [+]  py-six@1.16.0%apple-clang@16.0.0 build_system=python_pip arch=darwin-sequoia-m1
      [+]      ^py-pip@23.1.2%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      ```
      
      But the input spec is right there on the CLI, and it doesn't add anything to the output.
      Also, since #44843, specs concretized in the CLI line can be unified, so it makes sense
      to display them as we did in #44489 -- as one multi-root tree instead of as multiple
      single-root trees.
      
      With this PR, concretize output now looks like this:
      
      ```console
      > spack spec /v5fn6xo /wd2p2v7
      [+]  openssl@3.3.1%apple-clang@16.0.0~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
      [+]      ^ca-certificates-mozilla@2023-05-30%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      [+]      ^gmake@4.4.1%apple-clang@16.0.0~guile build_system=generic arch=darwin-sequoia-m1
      [+]      ^perl@5.40.0%apple-clang@16.0.0+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
      [+]          ^berkeley-db@18.1.40%apple-clang@16.0.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
      [+]          ^bzip2@1.0.8%apple-clang@16.0.0~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
      [+]              ^diffutils@3.10%apple-clang@16.0.0 build_system=autotools arch=darwin-sequoia-m1
      [+]                  ^libiconv@1.17%apple-clang@16.0.0 build_system=autotools libs=shared,static arch=darwin-sequoia-m1
      [+]          ^gdbm@1.23%apple-clang@16.0.0 build_system=autotools arch=darwin-sequoia-m1
      [+]              ^readline@8.2%apple-clang@16.0.0 build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
      [+]                  ^ncurses@6.5%apple-clang@16.0.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
      [+]                      ^pkgconf@2.2.0%apple-clang@16.0.0 build_system=autotools arch=darwin-sequoia-m1
      [+]      ^zlib-ng@2.2.1%apple-clang@16.0.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
      [+]          ^gnuconfig@2022-09-17%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      [+]  py-six@1.16.0%apple-clang@16.0.0 build_system=python_pip arch=darwin-sequoia-m1
      [+]      ^py-pip@23.1.2%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      [+]      ^py-setuptools@69.2.0%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      [-]      ^py-wheel@0.41.2%apple-clang@16.0.0 build_system=generic arch=darwin-sequoia-m1
      ...
      ```
      
      With no input spec displayed -- just the concretization output shown as one consolidated
      tree and multiple roots.
      
      - [x] remove "Input Spec" section and "Concretized" header from `spack spec` output
      - [x] print concretized specs as one BFS tree instead of multiple
      
      ---------
      
      Signed-off-by: default avatarTodd Gamblin <tgamblin@llnl.gov>
      Co-authored-by: default avatarHarmen Stoppels <harmenstoppels@gmail.com>
      e5c411d8
    • psakievich's avatar
      Update tutorial version (#47593) · 020e30f3
      psakievich authored
      020e30f3
  5. Nov 13, 2024