fix(pip): Only directly extract .whl files in Bazel >9#3452
fix(pip): Only directly extract .whl files in Bazel >9#3452aignas merged 2 commits intobazel-contrib:mainfrom
Conversation
Directly extracting .whl files is only supported in Bazel >=8.3.0. This change applies the workaround for Bazel <8.0.0 to all versions <9.0.0 for broader compatibility. Work towards bazel-contrib#2948
Summary of ChangesHello @armandomontanez, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the .whl file extraction mechanism within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses an issue with directly extracting .whl files in Bazel. The change adjusts the version check from Bazel 8 to Bazel 9, applying a workaround for all Bazel versions below 9.0.0 to ensure broader compatibility, as direct extraction is only reliably supported from Bazel 8.3.0. The changes are correct and consistent. I've added one minor suggestion to improve a code comment for future clarity.
| if rp_config.bazel_8_or_later: | ||
| # Extracting .whl files requires Bazel 8.3.0 or later, so require a | ||
| # minimum of Bazel 9.0.0 to ensure compatibilty with earlier versions | ||
| # of Bazel 8. | ||
| if rp_config.bazel_9_or_later: |
There was a problem hiding this comment.
Could we instead do this for 8.3 and above instead?
There was a problem hiding this comment.
Hmmmm.. Just to unbreak the older bazel versions, let me merge this.
Directly extracting .whl files is only supported in Bazel >=8.3.0 (see bazelbuild/bazel#26323). This change applies the workaround for Bazel <8.0.0 to all versions <9.0.0 for broader compatibility.
Work towards #2948