Merged
Conversation
fc86902 to
63a52d6
Compare
Using the CPU “darwin” doesn’t work correctly on ARM-64. Use the normal CPU and operating system constraints from the @platforms repository instead.
yushan26
pushed a commit
to yushan26/rules_go
that referenced
this pull request
Jun 16, 2025
This is a flag to start leveraging of the new code paths. The Starlark implementation has been added in 1.4 and has been reverted in the latest release candidates. The `env` variable will be a good way to roll it out more gradually and get more testing. For now we are switching only the `whl_library` internals as the `requirements.txt` files from `uv` may use `*` in `python_full_version` and `platform_version` that are not yet fully supported (bazel-contrib#2826). Main goals for this is to start using Starlark implementation so that we don't have any hidden variables. What is more, having this in Starlark is the most maintainable long-term solution for supporting cross-platform builds. Work towards bazel-contrib#260 --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com>
yushan26
pushed a commit
to yushan26/rules_go
that referenced
this pull request
Jun 16, 2025
Fixes: ``` ERROR: /Users/fmeum/git/rules_python/tests/pypi/env_marker_setting/BUILD.bazel:3:30: Illegal ambiguous match on configurable attribute "platform_machine" in //tests/pypi/env_marker_setting:test_expr_python_full_version_lt_negative_subject: @@platforms//cpu:aarch64 @@platforms//cpu:arm64 Multiple matches are not allowed unless one is unambiguously more specialized or they resolve to the same value. See https://bazel.build/reference/be/functions#select. ``` Work towards bazel-contrib#2850. Work towards bazel-contrib#2826.
yushan26
pushed a commit
to yushan26/rules_go
that referenced
this pull request
Jun 16, 2025
…rib#2856) This reuses the previous work by @vonschultz who implemented a PEP440 version normalizer. We extend it and use it in the PEP508 marker evaluation. Summary: - Extend the normalization parser to output individual parts of the versions to the parsing context. - Re-implement all of the version comparison calls to use the parsed version. - Add extra validation for `.*` usage in the environment markers - Fallback to non-version matching in the environment markers if one of the sides is not a version. - Rename the original normalizer file to `version.bzl` because as far as Python is concerned this is the only version that there can be. We could in theory probably reuse this in other code where we are parsing the Python interpreter version many times, but this is left for the future. Fixes bazel-contrib#2826 Work towards bazel-contrib#2821 --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com> Co-authored-by: Richard Levasseur <rlevasseur@google.com>
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.
Using the CPU “darwin” doesn’t work correctly on ARM-64. Use the normal CPU
and operating system constraints from the @platforms repository instead.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
Slightly improve ARM64 support on macOS.
Which issues(s) does this PR fix?
#2795 (not a complete fix, but a start)