spack/share/spack/gitlab/cloud_pipelines
Massimiliano Culpo d352b71df0
Error when an anonymous spec is required for a virtual package (#49385)
When requiring a constraint on a virtual package, it makes little
sense to use anonymous specs, and our documentation shows no example
of requirements on virtual packages starting with `^`.

Right now, due to how `^` is implemented in the solver, writing:
```yaml
mpi:
  require: "^openmpi"
```
is equivalent to the more correct form:
```yaml
mpi:
  require: "openmpi"
```
but the situation will change when `%` will shift its meaning to be a
direct dependency.

To avoid later errors that are both unclear, and quite slow to get to the user,
this commit makes anonymous specs under virtual requirements an error,
and shows a clear error message pointing to the file and line where the
spec needs to be changed.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-12 08:33:42 +01:00
..
configs Windows Ci: Ensure consistent EOL (#49377) 2025-03-10 18:06:02 -07:00
scripts/common Fix import error in CI log aggregation script (#48245) 2024-12-20 16:14:17 -07:00
stacks Error when an anonymous spec is required for a virtual package (#49385) 2025-03-12 08:33:42 +01:00
.gitlab-ci.yml Ci reactivate darwin pipelines (#48453) 2025-02-26 17:34:22 -06:00