From 2fbb06b7a8fe890ab2579e7bb876b3b3beaaae94 Mon Sep 17 00:00:00 2001 From: Ziad Shaban Date: Thu, 4 Jan 2024 23:30:37 +0100 Subject: [PATCH] add the comment explaining the logic back --- python/private/bzlmod/python.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/private/bzlmod/python.bzl b/python/private/bzlmod/python.bzl index d337c8c7d1..4b7d67e7a3 100644 --- a/python/private/bzlmod/python.bzl +++ b/python/private/bzlmod/python.bzl @@ -46,6 +46,10 @@ def _print_warn(msg): def _python_register_toolchains(name, toolchain_attr, module): """Calls python_register_toolchains and returns a struct used to collect the toolchains. """ + # Only the root module should have a say on whether or not to ignore the root user + # error. This can be achieved by taking the ignore_root_user_error for the root + # module. For all other modules, the ignore_root_user_error attr is set to True. + ignore_root_user_error = toolchain_attr.ignore_root_user_error ignore_root_user_error = not (module.is_root and toolchain_attr.ignore_root_user_error) python_register_toolchains( name = name,