feat(toolchain): support specifying x.y versions in transitions#1720
Merged
aignas merged 23 commits intobazel-contrib:mainfrom Jan 31, 2024
Merged
feat(toolchain): support specifying x.y versions in transitions#1720aignas merged 23 commits intobazel-contrib:mainfrom
aignas merged 23 commits intobazel-contrib:mainfrom
Conversation
Collaborator
Author
|
Hah, the build is unhappy, but not in all situations, however, wanted to submit this as it was in my local branch and #1555 added the missing pieces that I needed to get this almost working. |
…cy issues when initializing the repo
rickeylev
reviewed
Jan 25, 2024
f9b86c8 to
f963deb
Compare
rickeylev
reviewed
Jan 29, 2024
rickeylev
reviewed
Jan 29, 2024
rickeylev
approved these changes
Jan 31, 2024
Collaborator
rickeylev
left a comment
There was a problem hiding this comment.
LGTM. Just either remove the optional MINOR_MAPPING check, or put a comment about the case it is serving.
Co-authored-by: Richard Levasseur <[email protected]>
Co-authored-by: Richard Levasseur <[email protected]>
Test that the generated selects are actually correct
bc89626 to
3ca03ec
Compare
Collaborator
Author
|
I'm gonna merge this, but if you have a comment on how to make the test for the generated code better, let me know. It seemed like visual inspection was the easiest way for now. |
Collaborator
|
For testing, analysis_test can be used with selects and a small custom rule to hold values. Oh, actually, it looks like there are some tests that do basically this in tests/config_settings/construct_config_settings_test. |
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Jan 31, 2024
This is a followup to bazel-contrib#1720 to add better tests as commented in the PR and we ensure that we match correctly when the config setting is configured to a minor version.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 31, 2024
This is a followup to #1720 to add better tests as commented in the PR and we ensure that we match correctly when the config setting is configured to a minor version.
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.
This is inspired by how rules_go is registering their toolchains.
Their toolchains have multiple
target_settingsvalues. Thisallows for a simpler passing of
X.Yversion to thepy_binaryandpy_testrules and does not strictly require us to provide the APIsthat pass the full python version value as the closure. This is only
possible because #1555 introduced working aliases and now we can also
have this.
Summary:
MINOR_MAPPING has
"X.Y": "X.Y.Z".See https://github.com/bazelbuild/rules_go/blob/master/go/private/go_toolchain.bzl#L181