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

Simplify updating our dependency on rules_java. #12734

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5f8de55
More progress on #12081.
aiuto Dec 18, 2020
a5837bf
x
aiuto Dec 18, 2020
9862b6e
move branch name
aiuto Dec 18, 2020
f625426
fix typo in url field
aiuto Dec 18, 2020
2f17277
Merge remote-tracking branch 'upstream/master'
aiuto Dec 21, 2020
a430e47
Merge branch 'master' into wrtest
aiuto Dec 21, 2020
bc0f7f1
Include generated test workspace (e.g. jdk.WORKSPACE) files in bazel-…
aiuto Dec 21, 2020
8dbb4fa
fix my main to match upstream
aiuto Dec 21, 2020
a539b0e
undo adding the workspace
aiuto Dec 21, 2020
09c7e33
remove jdk.WORKSPACE from srcs
aiuto Dec 22, 2020
b6c9203
Merge branch 'master' into wrtest
aiuto Dec 23, 2020
e2404d0
Merge remote-tracking branch 'upstream/master'
aiuto Dec 23, 2020
1ba27e4
Merge branch 'master' into wrtest
aiuto Dec 23, 2020
8b77fb0
generate jdk.WORKSPACE
aiuto Dec 23, 2020
d563318
Merge remote-tracking branch 'upstream/master'
aiuto Dec 23, 2020
187b0b2
Merge branch 'master' into wrtest
aiuto Dec 23, 2020
ca2cde0
Merge remote-tracking branch 'upstream/master'
aiuto Dec 31, 2020
db97755
Merge branch 'master' into wrtest
aiuto Dec 31, 2020
56bb0f5
Merge remote-tracking branch 'upstream/master'
aiuto Jan 5, 2021
9a749eb
Merge branch 'master' into wrtest
aiuto Jan 5, 2021
a0e3ac2
Merge remote-tracking branch 'upstream/master'
aiuto Jan 5, 2021
0eb2dbf
Merge branch 'master' into wrtest
aiuto Jan 5, 2021
482f7dd
use.distdir
aiuto Jan 5, 2021
b749857
Merge remote-tracking branch 'upstream/master'
aiuto Jan 5, 2021
203fedb
Merge branch 'master' into wrtest
aiuto Jan 5, 2021
12acc24
update to the correct dist dir style
aiuto Jan 6, 2021
401959b
Merge remote-tracking branch 'upstream/master'
aiuto Jan 6, 2021
8d13b8f
Merge branch 'master' into wrtest
aiuto Jan 6, 2021
9a1b1da
Merge remote-tracking branch 'upstream/master'
aiuto Jan 7, 2021
e9fd132
Merge branch 'master' into wrtest
aiuto Jan 7, 2021
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
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ filegroup(
srcs = [
"//src/main/java/com/google/devtools/build/lib/bazel/rules:builtins_bzl.zip",
"//src/main/java/com/google/devtools/build/lib/bazel/rules/cpp:cc_configure.WORKSPACE",
"//src/main/java/com/google/devtools/build/lib/bazel/rules/java:workspace_with_jdk",
],
)

Expand Down
26 changes: 1 addition & 25 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ distdir_tar(
"bazel-skylib-1.0.3.tar.gz",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
# bazelbuild/bazel-toolchains
"bazel-toolchains-3.1.0.tar.gz",
# bazelbuild/rules_proto
Expand Down Expand Up @@ -193,8 +191,6 @@ distdir_tar(
"bazel-skylib-1.0.3.tar.gz": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": "48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
# bazelbuild/bazel-toolchains
"bazel-toolchains-3.1.0.tar.gz": "726b5423e1c7a3866a3a6d68e7123b4a955e9fcbe912a51e0f737e6dab1d0af2",
# bazelbuild/rules_proto
Expand Down Expand Up @@ -249,11 +245,6 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
],
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
# bazelbuild/bazel-toolchains
"bazel-toolchains-3.1.0.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz",
Expand Down Expand Up @@ -480,16 +471,10 @@ dist_http_archive(
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
)

http_archive(
dist_http_archive(
name = "rules_java",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
strip_prefix = "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
)

http_archive(
Expand Down Expand Up @@ -524,8 +509,6 @@ distdir_tar(
"bazel-skylib-1.0.3.tar.gz",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
# bazelbuild/rules_proto
"7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
# protocolbuffers/protobuf
Expand Down Expand Up @@ -558,8 +541,6 @@ distdir_tar(
"bazel-skylib-1.0.3.tar.gz": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# bazelbuild/platforms
"platforms-0.0.2.tar.gz": "48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3",
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
# bazelbuild/rules_proto
"7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
# protocolbuffers/protobuf
Expand Down Expand Up @@ -598,11 +579,6 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.2/platforms-0.0.2.tar.gz",
],
# bazelbuild/rules_java
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
# bazelbuild/rules_proto
"7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
Expand Down
11 changes: 11 additions & 0 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ DIST_DEPS = {
],
"need_in_test_WORKSPACE": True,
},
"rules_java": {
"archive": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
"strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
"urls": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
"need_in_test_WORKSPACE": True,
},

########################################
#
# Build time dependencies
Expand Down
17 changes: 15 additions & 2 deletions src/main/java/com/google/devtools/build/lib/bazel/rules/java/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("//:distdir_deps.bzl", "gen_workspace_stanza")
load("@rules_java//java:defs.bzl", "java_library")

package(
Expand All @@ -21,9 +22,10 @@ java_library(
resources = glob(
[
"*.txt",
"*.WORKSPACE",
],
),
) + [
":jdk.WORKSPACE",
],
deps = [
":bazel_java_semantics",
"//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster",
Expand Down Expand Up @@ -71,3 +73,14 @@ java_library(
"//third_party:jsr305",
],
)

gen_workspace_stanza(
name = "workspace_with_jdk",
out = "jdk.WORKSPACE",
repos = [
"rules_cc",
"rules_java",
],
template = "jdk.WORKSPACE.tmpl",
visibility = ["//:__pkg__"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -254,28 +254,10 @@ maybe(
],
)

maybe(
http_archive,
"rules_java",
sha256 = "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
strip_prefix = "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
)
{rules_java}

# Needed only because of java_tools.
maybe(
http_archive,
"rules_cc",
sha256 = "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
strip_prefix = "rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
"https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
],
)
{rules_cc}

# Needed only because of java_tools.
maybe(
Expand Down