diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java index a0060156292012..6150bbe11f91aa 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java @@ -474,8 +474,7 @@ public void init(ConfiguredRuleClassProvider.Builder builder) { new PyBootstrap( PyInfo.PROVIDER, PyStarlarkTransitions.INSTANCE, - new GoogleLegacyStubs.PyWrapCcHelper(), - new GoogleLegacyStubs.PyWrapCcInfoProvider())); + new GoogleLegacyStubs.PyWrapCcHelper())); builder.addSymlinkDefinition(PySymlink.PY2); builder.addSymlinkDefinition(PySymlink.PY3); diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/python/PyBootstrap.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/python/PyBootstrap.java index b3252d781ed504..fdc1e6bc0f537b 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/python/PyBootstrap.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/python/PyBootstrap.java @@ -21,7 +21,6 @@ import com.google.devtools.build.lib.starlarkbuildapi.core.Bootstrap; import com.google.devtools.build.lib.starlarkbuildapi.core.ContextAndFlagGuardedValue; import com.google.devtools.build.lib.starlarkbuildapi.cpp.PyWrapCcHelperApi; -import com.google.devtools.build.lib.starlarkbuildapi.cpp.PyWrapCcInfoApi; import com.google.devtools.build.lib.starlarkbuildapi.python.PyInfoApi.PyInfoProviderApi; import com.google.devtools.build.lib.starlarkbuildapi.stubs.ProviderStub; import net.starlark.java.eval.FlagGuardedValue; @@ -38,17 +37,14 @@ public class PyBootstrap implements Bootstrap { private final PyInfoProviderApi pyInfoProviderApi; private final PyStarlarkTransitionsApi pyStarlarkTransitionsApi; private final PyWrapCcHelperApi pyWrapCcHelper; - private final PyWrapCcInfoApi.Provider pyWrapCcInfoProvider; public PyBootstrap( PyInfoProviderApi pyInfoProviderApi, PyStarlarkTransitionsApi pyStarlarkTransitionsApi, - PyWrapCcHelperApi pyWrapCcHelper, - PyWrapCcInfoApi.Provider pyWrapCcInfoProvider) { + PyWrapCcHelperApi pyWrapCcHelper) { this.pyInfoProviderApi = pyInfoProviderApi; this.pyStarlarkTransitionsApi = pyStarlarkTransitionsApi; this.pyWrapCcHelper = pyWrapCcHelper; - this.pyWrapCcInfoProvider = pyWrapCcInfoProvider; } @Override @@ -79,7 +75,8 @@ public void addBindingsToBuilder(ImmutableMap.Builder builder) { "PyWrapCcInfo", ContextAndFlagGuardedValue.onlyInAllowedReposOrWhenIncompatibleFlagIsFalse( BuildLanguageOptions.INCOMPATIBLE_STOP_EXPORTING_LANGUAGE_MODULES, - pyWrapCcInfoProvider, + // Workaround for https://github.com/bazelbuild/bazel/issues/17713 + new ProviderStub(), allowedRepositories)); builder.put( "PyCcLinkParamsProvider",