Closed cassiebeckley closed 6 months ago
@dneto0 for review
@dneto0 I've updated the PR to use the correct Bazel version in Kokoro. I think the kokoro:run
label might need to be added again.
Heh. a failure:
INFO: Repository rules_python~0.31.0~python~python_3_11_x86_64-unknown-linux-gnu instantiated at:
: in
Repository rule python_repository defined at:
/root/.cache/bazel/_bazel_root/32ba09432cfff709a688fa7bb9a97efa/external/rules_python~0.31.0/python/repositories.bzl:402:36: in
ERROR: An error occurred during the fetch of repository 'rules_python~0.31.0~python~python_3_11_x86_64-unknown-linux-gnu':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/32ba09432cfff709a688fa7bb9a97efa/external/rules_python~0.31.0/python/repositories.bzl", line 205, column 25, in _python_repository_impl
fail("The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.")
Error in fail: The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.
Looking at that PR, this seems like the useful advice:
https://github.com/bazelbuild/rules_python/pull/713#issuecomment-1885628496
Which exercises the ignore_root_user_error
option introduced in this PR:
https://github.com/bazelbuild/rules_python//commit/e67e7dd719d34d5a13c15b24d0234c1ac753b52d
I started looking at the examples for rules_python. Starting from the docs at https://github.com/bazelbuild/rules_python/blob/main/BZLMOD_SUPPORT.md
and then looking at the first example here:
https://github.com/bazelbuild/rules_python/blob/main/examples/bzlmod/MODULE.bazel#L20
looks like the python.toolchain
stanza is what would need the ignore_root_user_error
clause.
Use the new Bazel module system. This should hopefully help fix the broken re2 import in SPIRV-Tools.