From aa5927f45f9b31c8bd971500ef16604a27bac5b1 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 20 Sep 2019 09:13:49 +0200 Subject: [PATCH 1/4] Bazel: Move codemirror library import to cm.bzl It was changed in I36192c9465d but this part of that change can be reverted, after rules_java is loaded in WORKSPACE file through the rules_closure repository. That is why the load of codemirror:cm.bzl can only be included after rules_closure repository is loaded. Change-Id: I0f6769cd59bb9da0a96929a51756d4c0972ae1ca --- WORKSPACE | 4 +++- lib/codemirror/BUILD | 16 +--------------- lib/codemirror/cm.bzl | 8 ++++++++ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b6809717ff..b76e537644 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,7 +2,6 @@ workspace(name = "gerrit") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_LOCAL", "maven_jar") -load("//lib/codemirror:cm.bzl", "CM_VERSION", "DIFF_MATCH_PATCH_VERSION") load("//plugins:external_plugin_deps.bzl", "external_plugin_deps") http_archive( @@ -89,6 +88,9 @@ closure_repositories( omit_rules_cc = True, ) +# This has to be done after loading of rules_closure, because it loads rules_java +load("//lib/codemirror:cm.bzl", "CM_VERSION", "DIFF_MATCH_PATCH_VERSION") + ANTLR_VERS = "3.5.2" maven_jar( diff --git a/lib/codemirror/BUILD b/lib/codemirror/BUILD index c17b3335f6..05ca920eb6 100644 --- a/lib/codemirror/BUILD +++ b/lib/codemirror/BUILD @@ -1,4 +1,4 @@ -load("@rules_java//java:defs.bzl", "java_import", "java_library") +load("@rules_java//java:defs.bzl", "java_library") load("//lib/codemirror:cm.bzl", "pkg_cm") # This library is only used to insert a license statement into @@ -10,17 +10,3 @@ java_library( ) pkg_cm() - -LICENSE = "//lib:LICENSE-codemirror-original" - -LICENSE_MINIFIED = "//lib:LICENSE-codemirror-minified" - -[java_import( - name = "codemirror" + suffix, - data = [license], - jars = [":jar%s" % suffix], - visibility = ["//visibility:public"], -) for suffix, license in [ - ("", LICENSE), - ("_r", LICENSE_MINIFIED), -]] diff --git a/lib/codemirror/cm.bzl b/lib/codemirror/cm.bzl index 20dcfcd8a8..bff5145849 100644 --- a/lib/codemirror/cm.bzl +++ b/lib/codemirror/cm.bzl @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import") load("//tools/bzl:genrule2.bzl", "genrule2") CM_CSS = [ @@ -362,3 +363,10 @@ def pkg_cm(): ], outs = ["codemirror%s.jar" % suffix], ) + + java_import( + name = "codemirror" + suffix, + jars = [":jar%s" % suffix], + visibility = ["//visibility:public"], + data = [license], + ) From 5f14048ed8637eea1ffa1f1d89309c02a82f809a Mon Sep 17 00:00:00 2001 From: Gert van Dijk Date: Sat, 21 Sep 2019 20:45:58 +0200 Subject: [PATCH 2/4] Documentation: Clarify that gerrit.reportBugText only works in GWT This feature was never supported in PolyGerrit. Bug: Issue 11137 Change-Id: I9a72698ac5a87c6cffd3494112f81fc676bb57a6 --- Documentation/config-gerrit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 244e77c306..31a840c1d6 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -2149,7 +2149,7 @@ should set this to the URL of their issue tracker, if necessary. + Text to be displayed in the link to the bug report URL. + -Only used when `gerrit.reportBugUrl` is set. +Only used when `gerrit.reportBugUrl` is set and only supported in GWT (Old UI). + Defaults to "Report Bug". From 0b1095bc7261e450e9f0c3ca20b4349861f85c34 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 24 Sep 2019 17:23:17 +0900 Subject: [PATCH 3/4] Remove unnecessary explicit loading of rules_proto rules_proto is implicitly loaded by rules_closure, so it doesn't need to be explicitly loaded. Change-Id: I163b871632a4c5ff3914849b6127993b9c9288aa --- WORKSPACE | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b76e537644..0bc8982d14 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,17 +54,6 @@ load("@bazelisk_version//:check.bzl", "check_bazel_version") check_bazel_version() -# Protobuf rules support -http_archive( - name = "rules_proto", - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - ], -) - # Rules Python http_archive( name = "rules_python", From 93c7a9fa2ff414b0612453f731b50bf8b3f3484e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 24 Sep 2019 17:26:09 +0900 Subject: [PATCH 4/4] Remove unnecessary explicit loading of rules_python rules_python is implicitly loaded by rules_closure, so it doesn't need to be explicitly loaded. Change-Id: I1a3a7ee9443f901d245b7c8ed55ee03ec11e6c49 --- WORKSPACE | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 0bc8982d14..04f045b5d6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,18 +54,6 @@ load("@bazelisk_version//:check.bzl", "check_bazel_version") check_bazel_version() -# Rules Python -http_archive( - name = "rules_python", - sha256 = "b5bab4c47e863e0fbb77df4a40c45ca85f98f5a2826939181585644c9f31b97b", - strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552", - urls = ["https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.tar.gz"], -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - load("@io_bazel_rules_closure//closure:repositories.bzl", "closure_repositories") # Prevent redundant loading of dependencies.