Add syntactic sugar for "strong preferences" and "conflicts"#41832
Merged
tgamblin merged 10 commits intospack:developfrom Jan 22, 2024
Merged
Add syntactic sugar for "strong preferences" and "conflicts"#41832tgamblin merged 10 commits intospack:developfrom
tgamblin merged 10 commits intospack:developfrom
Conversation
b674e9d to
04e89e9
Compare
Member
|
I'm generally fine with this change, we discussed:
|
haampie
reviewed
Jan 10, 2024
04e89e9 to
dd8e90d
Compare
tgamblin
previously approved these changes
Jan 18, 2024
Member
|
gitlab pipeline looks to be failing |
Member
Author
|
I'll try re-triggering the pipeline EDIT: possibly the issue fixed here #40045 |
Member
Author
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
dd8e90d to
c575b83
Compare
With requirements, we can already express strong preferences and conflicts, but the syntax to do it is not as clean as it should be. This PR adds syntactic sugar to express strong preferences and conflicts in packages.yaml files.
c575b83 to
90c5907
Compare
tgamblin
requested changes
Jan 20, 2024
tgamblin
approved these changes
Jan 22, 2024
RikkiButler20
pushed a commit
to RikkiButler20/spack
that referenced
this pull request
Jan 25, 2024
…1832) Currently requirements allow to express "strong preferences" and "conflicts" from configuration using a convoluted syntax: ```yaml packages: zlib-ng: require: # conflict on %clang - one_of: ["%clang", "@:"] # Strong preference for +shared - any_of: ["+shared", "@:"] ``` This PR adds syntactic sugar so that the same can be written as: ```yaml packages: zlib-ng: conflict: - "%clang" prefer: - "+shared" ``` Preferences written in this way are "stronger" that the ones documented at: - https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
RikkiButler20
pushed a commit
to RikkiButler20/spack
that referenced
this pull request
Jan 31, 2024
…1832) Currently requirements allow to express "strong preferences" and "conflicts" from configuration using a convoluted syntax: ```yaml packages: zlib-ng: require: # conflict on %clang - one_of: ["%clang", "@:"] # Strong preference for +shared - any_of: ["+shared", "@:"] ``` This PR adds syntactic sugar so that the same can be written as: ```yaml packages: zlib-ng: conflict: - "%clang" prefer: - "+shared" ``` Preferences written in this way are "stronger" that the ones documented at: - https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
kwryankrattiger
pushed a commit
to kwryankrattiger/spack
that referenced
this pull request
Jul 9, 2024
…1832) Currently requirements allow to express "strong preferences" and "conflicts" from configuration using a convoluted syntax: ```yaml packages: zlib-ng: require: # conflict on %clang - one_of: ["%clang", "@:"] # Strong preference for +shared - any_of: ["+shared", "@:"] ``` This PR adds syntactic sugar so that the same can be written as: ```yaml packages: zlib-ng: conflict: - "%clang" prefer: - "+shared" ``` Preferences written in this way are "stronger" that the ones documented at: - https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
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.

Currently requirements allow to express "strong preferences" and "conflicts" from configuration using a convoluted syntax:
This PR adds syntactic sugar so that the same can be written as:
Preferences written in this way are "stronger" that the ones documented at: