Skip to content

parse_specs: unify specs based on concretizer:unify#44843

Merged
tgamblin merged 10 commits intodevelopfrom
features/unify-for-non-environment-concretization
Nov 1, 2024
Merged

parse_specs: unify specs based on concretizer:unify#44843
tgamblin merged 10 commits intodevelopfrom
features/unify-for-non-environment-concretization

Conversation

@becker33
Copy link
Copy Markdown
Member

@becker33 becker33 commented Jun 24, 2024

Currently, the concretizer:unify: config option only affects environments.

With this PR, it now affects any group of specs given to a command using the parse_specs(*, concretize=True) interface.

  • implementation in parse_specs
  • tests
  • ensure all commands that accept multiple specs and concretize use parse_specs interface

@spackbot-app spackbot-app bot added commands core PR affects Spack core functionality tests General test capability(ies) labels Oct 7, 2024
@becker33 becker33 added this to the v0.23 milestone Oct 28, 2024
@becker33 becker33 force-pushed the features/unify-for-non-environment-concretization branch from 318fa2d to 45af646 Compare October 31, 2024 00:05
Copy link
Copy Markdown
Member

@tgamblin tgamblin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor request and one for a future PR. In the future, concretize_separately, concretize_together, and concretize_together_when_possible should be one method in spack.concretize. This PR gets us closer to that but not quite there, but I think that is fine b/c it's a localized change for parse_specs, and the bigger refactor would likely touch many more parts of the code.

@becker33 becker33 force-pushed the features/unify-for-non-environment-concretization branch from c025314 to 842b5bf Compare November 1, 2024 22:38
@tgamblin tgamblin enabled auto-merge (squash) November 1, 2024 23:37
@tgamblin tgamblin merged commit e42a4a8 into develop Nov 1, 2024
@tgamblin tgamblin deleted the features/unify-for-non-environment-concretization branch November 1, 2024 23:49
return [s.copy() for s in result.specs]


def concretize_together(*spec_list, **kwargs):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to note that in this file we added **kwargs and no type-hinting to new functions.

tgamblin added a commit that referenced this pull request Nov 13, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
tgamblin added a commit that referenced this pull request Nov 13, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
tgamblin added a commit that referenced this pull request Nov 13, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
tgamblin added a commit that referenced this pull request Nov 13, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
Co-authored-by: Harmen Stoppels <[email protected]>
haampie added a commit that referenced this pull request Nov 14, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
Co-authored-by: Harmen Stoppels <[email protected]>
Comment on lines -1677 to -1680
msg = "Starting concretization"
if sys.platform not in ("darwin", "win32") and num_procs > 1:
msg += f" pool with {num_procs} processes"
tty.msg(msg)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it intentional to remove this print ☝️ ? It was fairly useful in debugging pipeliines.

alalazo added a commit that referenced this pull request Nov 18, 2024
alalazo added a commit that referenced this pull request Nov 18, 2024
alalazo added a commit to alalazo/spack that referenced this pull request Nov 18, 2024
alalazo added a commit that referenced this pull request Nov 18, 2024
tldahlgren pushed a commit that referenced this pull request Nov 19, 2024
alalazo added a commit that referenced this pull request Nov 19, 2024
fryeguy52 pushed a commit to fryeguy52/spack that referenced this pull request Dec 17, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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 spack#44843, specs concretized in the CLI line can be unified, so it makes sense
to display them as we did in spack#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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
Co-authored-by: Harmen Stoppels <[email protected]>
fryeguy52 pushed a commit to fryeguy52/spack that referenced this pull request Dec 17, 2024
kshea21 pushed a commit to kshea21/spack that referenced this pull request Dec 26, 2024
`spack spec` output has looked like this for a while:

```console
> spack spec /v5fn6xo /wd2p2v7
Input spec
--------------------------------
 -   /v5fn6xo

Concretized
--------------------------------
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
...

Input spec
--------------------------------
 -   /wd2p2v7

Concretized
--------------------------------
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] 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 spack#44843, specs concretized in the CLI line can be unified, so it makes sense
to display them as we did in spack#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
[+]  [email protected]%[email protected]~docs+shared build_system=generic certs=mozilla arch=darwin-sequoia-m1
[+]      ^ca-certificates-mozilla@2023-05-30%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]~guile build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+cpanm+opcode+open+shared+threads build_system=generic arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=darwin-sequoia-m1
[+]          ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]              ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=darwin-sequoia-m1
[+]                  ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=darwin-sequoia-m1
[+]                      ^[email protected]%[email protected] build_system=autotools arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools arch=darwin-sequoia-m1
[+]          ^gnuconfig@2022-09-17%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]  [email protected]%[email protected] build_system=python_pip arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[+]      ^[email protected]%[email protected] build_system=generic arch=darwin-sequoia-m1
[-]      ^[email protected]%[email protected] 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: Todd Gamblin <[email protected]>
Co-authored-by: Harmen Stoppels <[email protected]>
kshea21 pushed a commit to kshea21/spack that referenced this pull request Dec 26, 2024
teaguesterling pushed a commit to teaguesterling/spack that referenced this pull request Feb 5, 2025
nkoukpaizan pushed a commit to nkoukpaizan/spack that referenced this pull request Apr 4, 2025
vjranagit pushed a commit to vjranagit/spack that referenced this pull request Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands core PR affects Spack core functionality environments tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants