diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2024-06-03 22:29:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 13:29:14 -0700 |
commit | 85f13442d2a7486daba81fdd9a3b6a1182ba11f6 (patch) | |
tree | e048fb9bfaf9d7eccf03d4bca8ac8cb19e5d8917 /etc | |
parent | f478a65635379a783615462c4417f8464cc03a74 (diff) | |
download | spack-85f13442d2a7486daba81fdd9a3b6a1182ba11f6.tar.gz spack-85f13442d2a7486daba81fdd9a3b6a1182ba11f6.tar.bz2 spack-85f13442d2a7486daba81fdd9a3b6a1182ba11f6.tar.xz spack-85f13442d2a7486daba81fdd9a3b6a1182ba11f6.zip |
Consolidate concretization output for environments (#44489)
When Spack concretizes environments, it prints every (newly concretized) root spec
individually with all of its dependencies. For most reasonably sized environments, this
is too much output. This is true for three commands:
* `spack concretize` when concretizing an environment with newly added specs
* `spack install` when installing an environment with newly added specs
* `spack spec` with no arguments in an environment
The output dates back to before we had unified environments or nicer spec traversal
routines, and we can improve it.
This PR makes environment concretization output analogous to what we do for regular
specs. Just like `spack spec` for a single spec, we show all root specs with no
indentation, so you can easily see the specs you explicitly requested. Dependencies are
shown:
1. With indentation according to their depth in a breadth-first traversal starting at
the roots;
2. Only once if they appear on paths from multiple roots
So, the default is now consistent with `spack spec` for one spec--it's `--cover=nodes`.
i.e., if there are 100 specs in your environment, you'll get 100 lines of output.
If you want to see more details, you can do that with `spack spec` using the arguments
you're already familiar with. For example, if you wanted to see dependency types and
*all* dependencies, you could use `spack spec -l --cover=edges`. Or you could add
deptypes and namespaces with, e.g. `spack spec -ltN`.
With no arguments in an environment, `spack spec` concretizes (if necessary) and shows
the concretized environment. If you run `spack concretize` *first*, inspecting the
environment repeatedly with `spack spec` will be fast, as everything is already in the
`spack.lock` file.
- [x] factor most logic of `Spec.tree()` out of `Spec` class into `spack.spec.tree()`,
which can take multiple specs as roots.
- [x] make `Spec.tree()` call `spack.spec.tree()`
- [x] `spack.environment.display_specs()` now uses `spack.spec.tree()`
- [x] Update `spack concretize`
- [x] Update `spack install`
- [x] Update `spack spec` to call `spack.spec.tree()` for environments.
- [x] Continue to output specs individually for `spack spec` when using
`--yaml` or `--json`
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions