From 764ba19ea5b935d7dd8b112a02dcbe05e4d9a5d5 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 6 Nov 2024 05:39:07 -0800 Subject: [PATCH] Don't check main repo name for auto-load when bzlmod is disabled. PiperOrigin-RevId: 693692713 Change-Id: I65db496e79b30952525dd7995080109fcfc4f9f5 --- .../devtools/build/lib/skyframe/StarlarkBuiltinsFunction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/StarlarkBuiltinsFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/StarlarkBuiltinsFunction.java index f7ab2bc6a07dd4..0117546b50ee6b 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/StarlarkBuiltinsFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/StarlarkBuiltinsFunction.java @@ -190,7 +190,8 @@ private static StarlarkBuiltinsValue computeInternal( return null; } - if (autoloadSymbols.isEnabled()) { + if (autoloadSymbols.isEnabled() + && starlarkSemantics.getBool(BuildLanguageOptions.ENABLE_BZLMOD)) { // We can't do autoloads where the rules are implemented (disabling them when running in // main repository named rules_python) ModuleFileValue mainModule =