ASP-based solver: improve selection behavior for buildable externals#22566
Merged
becker33 merged 2 commits intospack:developfrom Mar 29, 2021
Merged
Conversation
Member
Author
|
Restarted after merging #22568 |
ee006a3 to
bc2f67d
Compare
becker33
requested changes
Mar 29, 2021
lib/spack/spack/solver/asp.py
Outdated
| self.possible_versions[pkg.name], key=keyfn, reverse=True | ||
| ) | ||
| # Compute which versions appear only in packages.yaml | ||
| from_packages_yaml = self.versions_in_packages_yaml[pkg.name] |
Member
There was a problem hiding this comment.
Does this include versions set from
packages:
foo:
versions: [...]
If not, then I think we should rename the variables to be *from_externals instead of *from_packages_yaml.
Member
Author
There was a problem hiding this comment.
No, it doesn't account for version preferences - only for versions of external specs that are unknown to Spack. I'll change the name accordingly.
Member
Author
There was a problem hiding this comment.
Changed, rebased and pushed.
bc2f67d to
9884c88
Compare
fixes spack#22565 This change enforces the uniqueness of the version_weight atom per node(Package) in the DAG. It does so by applying FTSE and adding an extra layer of indirection with the possible_version_weight/2 atom. Before this change it may have happened that for the same node two different version_weight/2 were in the answer set, each of which referred to a different spec with the same version, and their weights would sum up. This lead to unexpected result like preferring to build a new version of an external if the external version was older.
fixes spack#22596 Variants which are specified in an external spec are not scored negatively if they encode a non-default value.
9884c88 to
a51635e
Compare
becker33
approved these changes
Mar 29, 2021
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 #22565
fixes #22596
NOTE: REBASE AND MERGE INSTEAD OF SQUASH
This PR improves the handling of external specs by the clingo concretizer by making them always preferred to rebuilding, regardless of: