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
concretize.lp: fix issue with reuse of conditional variants #43676
Merged
haampie
merged 4 commits into
spack:develop
from
haampie:fix/reuse-variant-only-when-set
Apr 16, 2024
Merged
concretize.lp: fix issue with reuse of conditional variants #43676
haampie
merged 4 commits into
spack:develop
from
haampie:fix/reuse-variant-only-when-set
Apr 16, 2024
Conversation
This file contains 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
spackbot-app
bot
added
core
PR affects Spack core functionality
stand-alone-tests
Stand-alone (or smoke) tests for installed packages
tests
General test capability(ies)
labels
Apr 16, 2024
currently if you request `pkg +example` where `example` is a conditional variant, and you have a `pkg` in the database for which the condition did not hold (so no +example nor ~example), the solver would reuse it regardless, not imposing `+example`.
haampie
force-pushed
the
fix/reuse-variant-only-when-set
branch
from
April 16, 2024 13:27
6031ff7
to
e7218dd
Compare
adamjstewart
previously approved these changes
Apr 16, 2024
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 the problem for me, thanks!
alalazo
reviewed
Apr 16, 2024
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
haampie
commented
Apr 16, 2024
alalazo
approved these changes
Apr 16, 2024
tldahlgren
pushed a commit
to tldahlgren/spack
that referenced
this pull request
Apr 23, 2024
) Currently if you request pkg +example where example is a conditional variant, and you have a pkg in the database for which the condition did not hold (so no +example nor ~example), the solver would reuse it regardless, not imposing +example. The change rules out exactly one thing: variant_set without variant_value, which in practice could only happen when not node_has_variant (i.e. when under the current package.py rules the variant's when condition did not trigger).
stephenmsachs
pushed a commit
to stephenmsachs/spack
that referenced
this pull request
Apr 29, 2024
) Currently if you request pkg +example where example is a conditional variant, and you have a pkg in the database for which the condition did not hold (so no +example nor ~example), the solver would reuse it regardless, not imposing +example. The change rules out exactly one thing: variant_set without variant_value, which in practice could only happen when not node_has_variant (i.e. when under the current package.py rules the variant's when condition did not trigger).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
core
PR affects Spack core functionality
stand-alone-tests
Stand-alone (or smoke) tests for installed packages
tests
General test capability(ies)
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.
Closes #43663
Currently if you request
pkg +example
whereexample
is a conditionalvariant, and you have a
pkg
in the database for which the conditiondid not hold (so no
+example
nor~example
), the solver would reuse itregardless, not imposing
+example
.The change rules out exactly one thing:
variant_set
withoutvariant_value
,which in practice could only happen when
not node_has_variant
(i.e. whenunder the current
package.py
rules the variant's when condition did nottrigger).