go_compat_repo: alias constraint values and settings to bazel_tools or platforms#2275
Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom Nov 7, 2019
Merged
Conversation
…r platforms os and cpu constraint settings and values are being removed from @bazel_tools//platforms. They are currently available in the external @platforms repo (now declared in go_rules_dependencies). So we should reference those instead of @bazel_tools//platforms. In order to support old Bazel versions (the current minimum is still 0.23.0), @io_bazel_rules_go_compat//platforms now declares aliases on either @platforms or @bazel_tools//platforms. Note that bazel-skylib 1.0.2 (the latest released version) is not compatible with --incompatible_use_platforms_repo_for_constraints yet, so not all rules_go tests pass with that flag yet. Updates bazelbuild/bazel#8622
Collaborator
Author
|
@hlopko I took a stab at this. Rather than declaring functions in the compat repo, I'm defining aliases in that repo, and anything that needs to refer to a standard Seems to work with Bazel 0.23.0 and 1.1.0 with |
Contributor
|
Wow this is great, thanks Jay! |
jayconrod
pushed a commit
that referenced
this pull request
Dec 4, 2019
…r platforms (#2275) os and cpu constraint settings and values are being removed from @bazel_tools//platforms. They are currently available in the external @platforms repo (now declared in go_rules_dependencies). So we should reference those instead of @bazel_tools//platforms. In order to support old Bazel versions (the current minimum is still 0.23.0), @io_bazel_rules_go_compat//platforms now declares aliases on either @platforms or @bazel_tools//platforms. Note that bazel-skylib 1.0.2 (the latest released version) is not compatible with --incompatible_use_platforms_repo_for_constraints yet, so not all rules_go tests pass with that flag yet. Updates bazelbuild/bazel#8622
jayconrod
pushed a commit
that referenced
this pull request
Dec 4, 2019
…r platforms (#2275) os and cpu constraint settings and values are being removed from @bazel_tools//platforms. They are currently available in the external @platforms repo (now declared in go_rules_dependencies). So we should reference those instead of @bazel_tools//platforms. In order to support old Bazel versions (the current minimum is still 0.23.0), @io_bazel_rules_go_compat//platforms now declares aliases on either @platforms or @bazel_tools//platforms. Note that bazel-skylib 1.0.2 (the latest released version) is not compatible with --incompatible_use_platforms_repo_for_constraints yet, so not all rules_go tests pass with that flag yet. Updates bazelbuild/bazel#8622
yushan26
pushed a commit
to yushan26/rules_go
that referenced
this pull request
Jun 16, 2025
…major_minor (bazel-contrib#2275) With this change the users can simply reuse our internal flag that will correctly report the `X.Y` version in `select` statements. If users previously depended on now removed `is_python_config_setting` now they have an alternative. Followup to bazel-contrib#2253
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.
os and cpu constraint settings and values are being removed from
@bazel_tools//platforms. They are currently available in the external
@platforms repo (now declared in go_rules_dependencies). So we should
reference those instead of @bazel_tools//platforms.
In order to support old Bazel versions (the current minimum is still
0.23.0), @io_bazel_rules_go_compat//platforms now declares aliases on
either @platforms or @bazel_tools//platforms.
Note that bazel-skylib 1.0.2 (the latest released version) is not
compatible with --incompatible_use_platforms_repo_for_constraints yet,
so not all rules_go tests pass with that flag yet.
Updates bazelbuild/bazel#8622