Closed tpasternak closed 1 month ago
Thanks for the report.
This looks like an easy fix. When X.Y/defs.bzl
is used, it's using the py_binary
in python/config_settings/transition.bzl
, which only includes one of the two PyInfo objects, giving preference to the non-builtin on. It's easy to make it forward along both.
However, the intellij plugin needs to be updated to handle the @rules_python
provider. The @_builtins
provider will be going away eventually. It should recognized both, giving preference to the @rules_python
one.
Thank you for fixing it so quickly! We're aware that built-in providers will no longer be available in Bazel 8. However now we plan to overcome this problem with the --incompatible_autoload_externally
flag
π bug report
Is this a regression?
probably not
Description
A clear and concise description of the problem... ## π¬ Minimal Reproduction Just use this repo: ``` File: BUILD.bazel 1 load("@python_versions//3.12:defs.bzl", "py_binary") 2 #load("@rules_python//python:defs.bzl", "py_binary") 3 4 py_binary( 5 name = "main", 6 srcs = ["main/main.py"], 7 ) File: MODULE.bazel 1 bazel_dep( 2 name = "rules_python", 3 version = "0.34.0", 4 ) 5 6 python = use_extension("@rules_python//python/extensions:python.bzl", "python") 7 python.toolchain( 8 python_version = "3.12", 9 ) 10 use_repo(python, "python_versions") File: main/main.py