-
Notifications
You must be signed in to change notification settings - Fork 543
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
feat(toolchain): support specifying x.y versions in transitions #1720
Conversation
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
f9b86c8
to
f963deb
Compare
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.
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
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. |
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. |
This is a followup to bazelbuild#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 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 is inspired by how rules_go is registering their toolchains.
Their toolchains have multiple
target_settings
values. Thisallows for a simpler passing of
X.Y
version to thepy_binary
andpy_test
rules 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