Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer expose the embedded JDK. #6830

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ new_local_repository(
build_file = __embedded_dir__ + "/jdk.BUILD",
)

new_local_repository(
name = "embedded_jdk",
path = DEFAULT_SERVER_JAVABASE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is removing this identifier going to happen in a followup change?

build_file = __embedded_dir__ + "/jdk.BUILD",
)

bind(
name = "bootclasspath",
actual = "@local_jdk//:bootclasspath",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public class WorkspaceFactory {
"workspace",
"__embedded_dir__", // serializable so optional
"__workspace_dir__", // serializable so optional
"DEFAULT_SERVER_JAVABASE", // serializable so optional
"DEFAULT_SYSTEM_JAVABASE", // serializable so optional
PackageFactory.PKG_CONTEXT);

Expand Down Expand Up @@ -583,7 +582,6 @@ private void addWorkspaceFunctions(Environment workspaceEnv, StoredEventHandler
if (javaHome.getName().equalsIgnoreCase("jre")) {
javaHome = javaHome.getParentFile();
}
workspaceEnv.update("DEFAULT_SERVER_JAVABASE", javaHome.toString());
workspaceEnv.update("DEFAULT_SYSTEM_JAVABASE", getDefaultSystemJavabase());

for (EnvironmentExtension extension : environmentExtensions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ private Label getHostJavaBase() {
if (useJDK10AsHostJavaBase) {
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:remote_jdk10");
} else {
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:remote_jdk");
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:host_jdk");
meisterT marked this conversation as resolved.
Show resolved Hide resolved
}
}
return hostJavaBase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ EOF
expect_query_targets //tools/defaults:jdk //a:a

bazel query 'deps(//tools/defaults:jdk, 1)' >& "$TEST_log" --incompatible_disable_tools_defaults_package=false || fail "Query failed"
expect_query_targets //tools/defaults:jdk @bazel_tools//tools/jdk:{jdk,remote_jdk}
expect_query_targets //tools/defaults:jdk @bazel_tools//tools/jdk:{jdk,host_jdk}

rm tools/defaults/BUILD
rm a/BUILD
Expand All @@ -77,7 +77,7 @@ filegroup(
)
EOF
bazel query 'deps(//tools/defaults:jdk, 1)' >& "$TEST_log" --incompatible_disable_tools_defaults_package=false || fail "Query failed"
expect_query_targets //tools/defaults:jdk @bazel_tools//tools/jdk:{jdk,remote_jdk}
expect_query_targets //tools/defaults:jdk @bazel_tools//tools/jdk:{jdk,host_jdk}


bazel query 'deps(//tools/defaults:jdk, 1)' >& "$TEST_log" --incompatible_disable_tools_defaults_package=true || fail "Query failed"
Expand Down
2 changes: 1 addition & 1 deletion tools/jdk/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ alias(

alias(
name = "host_jdk",
actual = "@embedded_jdk//:jdk",
actual = ":remote_jdk",
)

bootclasspath(
Expand Down