-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Ensure the ASP-based solver can concretize against any installed spec #20292
Description
Ensure that using an installed dependency referenced by hash works even if the corresponding package.py has been changed in the meanwhile (a variant has been added or removed etc.).
Rationale
This is already handled by the old concretizer, so we should ensure it works also with the new. We should be able to reuse what is installed, if the installed spec satisfies the constraints for the problem at hand.
Description
Add a test that:
- Installs a mock package
- Modifies the corresponding
package.py - Uses the installation at 1 to satisfy a dependency for another package
and verify that it concretize correctly.
Additional information
Currently this is broken both with the original concretizer and the new concretizer. The original concretizer treats correctly the case where a variant is added to package.py, but fails if a variant is removed:
$ spack spec hdf5~mpi ^/tc5xvfd
Input spec
--------------------------------
hdf5~mpi
^[email protected]%[email protected]+optimize+pic+shared arch=linux-ubuntu18.04-x86_64
Concretized
--------------------------------
==> Error: trying to set variant "pic" in package "zlib", but the package has no such variant [happened during concretization of [email protected]%[email protected]~cxx~debug~fortran~hl~java~mpi+pic+shared~szip~threadsafe api=none arch=linux-ubuntu18.04-x86_64 ^[email protected]%[email protected]+optimize+pic+shared arch=linux-ubuntu18.04-x86_64]The new concretizer fails with the same error if a variant is removed:
$ spack solve hdf5~mpi ^/tc5xvfd
==> Error: trying to set variant "pic" in package "zlib", but the package has no such variant [happened during concretization of hdf5~mpi ^[email protected]%[email protected]+optimize+pic+shared arch=linux-ubuntu18.04-x86_64]and adds an additional variant with its default value if a variant is added (which is wrong).
General information
- I have searched the issues of this repo and believe this is not a duplicate