-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP-based solver: always consider version of installed packages #29933
ASP-based solver: always consider version of installed packages #29933
Conversation
c7a4e74
to
c63d55d
Compare
c63d55d
to
5dcb505
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested the following scenario:
Package foo declares versions a, b
foo@c installed
foo@b preferred
foo@b conflicts with something in spec
I think in that case this will lead to concretizing foo@c
even though it's only a valid version for reusing.
@@ -1654,6 +1656,12 @@ def _facts_from_concrete_spec(self, spec, possible): | |||
|
|||
# add OS to possible OS's | |||
for dep in spec.traverse(): | |||
self.possible_versions[dep.name].add(dep.version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment above this block probably should change to reflect the new content, maybe
# ensure all attributes of installed specs are considered possible values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7727cd1
fixes spack#29201 Explicitly add facts for versions of installed software when using the --reuse option, so that we could consider versions that are not declared in package.py
5dcb505
to
7727cd1
Compare
That scenario was working, but I came up with something along the same lines that wasn't. Fixed and added a new unit test for it. Thanks! |
lib/spack/spack/test/concretize.py
Outdated
"""Test that we can reuse installed specs with versions not | ||
declared in package.py | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring looks like it was mistakenly copied from the previous test.
"""Test that we can reuse installed specs with versions not | |
declared in package.py | |
""" | |
"""Test that we cannot build with versions only declared for reuse. | |
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 9876f66
* ASP-based solver: always consider version of installed packages fixes #29201 Explicitly add facts for versions of installed software when using the --reuse option, so that we could consider versions that are not declared in package.py
fixes #29201
fixes #30064
Explicitly add facts for versions of installed software when using the
--reuse
option, so that we could consider versions that are not declared inpackage.py
Modifications: