-
Notifications
You must be signed in to change notification settings - Fork 2.4k
depends_on can specify matching dependencies #10255
Copy link
Copy link
Open
Labels
featureA feature is missing in SpackA feature is missing in Spack
Description
It would be nice to have a simple way to specify matching dependencies for related packages. For example, petsc4py always depends on a matching version of petsc:
depends_on('[email protected]:3.10.99+mpi', when='@3.10:3.10.99')
depends_on('[email protected]:3.9.99+mpi', when='@3.9:3.9.99')
depends_on('[email protected]:3.8.99+mpi', when='@3.8:3.8.99')
depends_on('[email protected]:3.7.99+mpi', when='@3.7:3.7.99')
depends_on('[email protected]:3.6.99+mpi', when='@3.6:3.6.99')
The above lines could then be replaced by the single line:
depends_on('petsc+mpi', match="3.10")
or perhaps:
depends_on('petsc+mpi', match="@3.10:3.10.99")
where the "3.10" would be extrapolated to all available versions e.g. 3.6.1 petsc4py would match with 3.6.3 petsc (similar to how the URL is currently extrapolated from the url field in the package).
Matching dependencies would make it easier to fix issues like this:
- version constraints are somewhat not respected and break concretizer version constraints are somewhat not respected and break concretizer #5753
It would also prevent updates of one package (in this case petsc to 3.11) breaking the installation of another package (petsc4py) because the dependent package (petsc4py) may not yet have been updated with:
depends_on('[email protected]:3.11.99+mpi', when='@3.11:3.11.99')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureA feature is missing in SpackA feature is missing in Spack