diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java b/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java index 03d1cdda72255c..af9a0cb5ca4461 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java @@ -15,12 +15,8 @@ import static com.google.devtools.build.lib.skyframe.BzlLoadValue.keyForBuiltins; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.actions.Artifact; -import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.cmdline.Label; -import com.google.devtools.build.lib.collect.nestedset.Depset; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; @@ -29,12 +25,10 @@ import com.google.devtools.build.lib.packages.RuleClass.ConfiguredTargetFactory.RuleErrorException; import com.google.devtools.build.lib.packages.StarlarkInfo; import com.google.devtools.build.lib.packages.StarlarkInfoWithSchema; -import com.google.devtools.build.lib.packages.StarlarkProvider; import com.google.devtools.build.lib.packages.StarlarkProviderWrapper; import com.google.devtools.build.lib.packages.StructImpl; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Optional; -import net.starlark.java.eval.EvalException; import net.starlark.java.eval.Starlark; /** Information about the system APIs for a Java compilation. */ @@ -76,29 +70,6 @@ public static BootClassPathInfo empty() { return EMPTY; } - public static BootClassPathInfo create(RuleContext ruleContext, NestedSet bootclasspath) - throws RuleErrorException, InterruptedException { - if (bootclasspath.isEmpty()) { - return empty(); - } - ruleContext.initStarlarkRuleContext(); - StructImpl javaCommon = (StructImpl) ruleContext.getStarlarkDefinedBuiltin("java_common"); - try { - StarlarkProvider starlarkProvider = - javaCommon.getValue("BootClassPathInfo", StarlarkProvider.class); - StarlarkInfo starlarkBootClassPathInfo = - (StarlarkInfo) - Starlark.call( - ruleContext.getStarlarkThread(), - starlarkProvider.createRawConstructor(), - ImmutableList.of(), - ImmutableMap.of("bootclasspath", Depset.of(Artifact.class, bootclasspath))); - return PROVIDER.wrap(starlarkBootClassPathInfo); - } catch (EvalException e) { - throw new RuleErrorException(e); - } - } - private BootClassPathInfo(StructImpl underlying) { super(underlying); } diff --git a/src/main/starlark/builtins_bzl/common/exports.bzl b/src/main/starlark/builtins_bzl/common/exports.bzl index e72cd06f3d8bbf..7bb6bee0856dc3 100755 --- a/src/main/starlark/builtins_bzl/common/exports.bzl +++ b/src/main/starlark/builtins_bzl/common/exports.bzl @@ -43,7 +43,6 @@ load(":common/cc/fdo/fdo_prefetch_hints.bzl", "fdo_prefetch_hints") load(":common/cc/fdo/fdo_profile.bzl", "fdo_profile") load(":common/cc/fdo/memprof_profile.bzl", "memprof_profile") load(":common/cc/fdo/propeller_optimize.bzl", "propeller_optimize") -load(":common/java/java_binary_deploy_jar.bzl", get_java_build_info = "get_build_info") load(":common/java/java_common.bzl", "java_common") load(":common/java/java_info.bzl", "JavaInfo", "JavaPluginInfo") load(":common/objc/apple_common.bzl", "apple_common") @@ -104,7 +103,5 @@ exported_to_java = { "j2objc_mapping_file_info_union": objc_common.j2objc_mapping_file_info_union, "j2objc_entry_class_info_union": objc_common.j2objc_entry_class_info_union, "init_cc_compilation_context": cc_compilation_helper.init_cc_compilation_context, - "java_common": java_common, - "get_build_info": get_java_build_info, "get_toolchain_global_make_variables": cc_helper.get_toolchain_global_make_variables, }