Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Set --incompatible_python_disallow_native_rules"
This reverts commit 1348c3b. The --incompatible_python_disallow_native_rules flag fails in WORKSPACE mode due to incompatible use in the builtin `@bazel_tools` repo. See https://github.com/aherrmann/rules_zig/actions/runs/11626106944/job/32377199087?pr=380#step:3:762 ``` (07:45:07) ERROR: /home/runner/.cache/bazel-repo/bazel/_bazel_runner/e97befc866f153aa83e528704066dbd2/external/bazel_tools/tools/python/BUILD:110:31: in py_runtime rule @@bazel_tools//tools/python:_autodetecting_py3_runtime: Traceback (most recent call last): File "/virtual_builtins_bzl/common/python/py_runtime_rule.bzl", line 24, column 25, in _py_runtime_impl File "/virtual_builtins_bzl/common/python/common.bzl", line 520, column 13, in check_native_allowed Error in fail: @bazel_tools//tools/python:_autodetecting_py3_runtime not allowed to use native.py_runtime Generated by: define_autodetecting_toolchain(name=autodetecting_toolchain) in tools/python/BUILD:110:31 Allowlist: no allowlist specified; all disallowed; specify one with --python_native_rules_allowlist Migrate to using @rules_python, see bazelbuild/bazel#17773 FIXCMD: add_python_loads --target=@bazel_tools//tools/python:_autodetecting_py3_runtime --rule=py_runtime --generator_name=autodetecting_toolchain --location=tools/python/BUILD:110:31 ``` The `@bazel_tools` repo cannot be modified, so the `FIXCMD` solution does not apply. The allowlist flag expects a package_group, but `@bazel_tools` has no pre-defined package_group, and a user defined `package_group` cannot refer to other workspaces because elements of the `packages` attribute must start with `//`. See the discussion around the following comment for other solutions: bazelbuild/bazel#17773 (comment)
- Loading branch information