ASP-based solver: always consider version of installed packages#29933
Merged
becker33 merged 4 commits intospack:developfrom Apr 25, 2022
Merged
Conversation
c7a4e74 to
c63d55d
Compare
c63d55d to
5dcb505
Compare
becker33
reviewed
Apr 12, 2022
Member
becker33
left a comment
There was a problem hiding this comment.
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.
|
|
||
| # add OS to possible OS's | ||
| for dep in spec.traverse(): | ||
| self.possible_versions[dep.name].add(dep.version) |
Member
There was a problem hiding this comment.
The comment above this block probably should change to reflect the new content, maybe
# ensure all attributes of installed specs are considered possible values.
3 tasks
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
Member
Author
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! |
becker33
requested changes
Apr 22, 2022
lib/spack/spack/test/concretize.py
Outdated
Comment on lines
+1552
to
+1554
| """Test that we can reuse installed specs with versions not | ||
| declared in package.py | ||
| """ |
Member
There was a problem hiding this comment.
This docstring looks like it was mistakenly copied from the previous test.
Suggested change
| """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. | |
| """ |
becker33
approved these changes
Apr 25, 2022
tgamblin
pushed a commit
that referenced
this pull request
Apr 25, 2022
* 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
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #29201
fixes #30064
Explicitly add facts for versions of installed software when using the
--reuseoption, so that we could consider versions that are not declared inpackage.pyModifications: