spack/lib/spack/docs/images
Massimiliano Culpo 16fa3b9f07
Cherry-picking virtual dependencies (#35322)
This PR makes it possible to select only a subset of virtual dependencies from a spec that _may_ provide more. To select providers, a syntax to specify edge attributes is introduced:
```
hdf5 ^[virtuals=mpi] mpich
```
With that syntax we can concretize specs like:
```console
$ spack spec strumpack ^[virtuals=mpi] intel-parallel-studio+mkl ^[virtuals=lapack] openblas
```

On `develop` this would currently fail with:
```console
$ spack spec strumpack ^intel-parallel-studio+mkl ^openblas
==> Error: Spec cannot include multiple providers for virtual 'blas'
    Requested 'intel-parallel-studio' and 'openblas'
```

In package recipes, virtual specs that are declared in the same `provides` directive need to be provided _together_. This means that e.g. `openblas`, which has:
```python
provides("blas", "lapack")
```
needs to provide both `lapack` and `blas` when requested to provide at least one of them.

## Additional notes

This capability is needed to model compilers. Assuming that languages are treated like virtual dependencies, we might want e.g. to use LLVM to compile C/C++ and Gnu GCC to compile Fortran. This can be accomplished by the following[^1]:
```
hdf5 ^[virtuals=c,cxx] llvm ^[virtuals=fortran] gcc
```

[^1]: We plan to add some syntactic sugar around this syntax, and reuse the `%` sigil to avoid having a lot of boilerplate around compilers.

Modifications:
- [x] Add syntax to interact with edge attributes from spec literals
- [x] Add concretization logic to be able to cherry-pick virtual dependencies
- [x] Extend semantic of the `provides` directive to express when virtuals need to be provided together
- [x] Add unit-tests and documentation
2023-11-01 23:35:23 -07:00
..
adapter.png Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
builder_package_architecture.png Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
builder_phases.png Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
ghcr_spack.png docs: update the list of Docker images with Spack preinstalled (#31003) 2022-06-07 16:43:04 +02:00
installation_pipeline.png Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
original_package_architecture.png Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
packaging.excalidrawlib Allow for packages with multiple build-systems (#30738) 2022-10-26 20:17:32 +02:00
pr-commit.png
projects.png
setup_env.png SetupContext.get_env_modifications fixes and documentation (#40683) 2023-11-01 08:47:15 +01:00
shapely_duplicates.svg Make "minimal" the default duplicate strategy (#39621) 2023-10-06 10:24:21 +02:00
strumpack_virtuals.svg Cherry-picking virtual dependencies (#35322) 2023-11-01 23:35:23 -07:00