From 75076df6c0a1d471a30ee40b0fe813c195594196 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sat, 8 Jun 2019 18:16:08 +0200 Subject: [PATCH 1/3] Bazel: Make build tool chain forward compatible Bazel 0.27 is going to flip incompatible Starlark flag: --incompatible_string_join_requires_strings, see: [1] for more details. [1] https://github.com/bazelbuild/bazel/issues/7802 Bug: Issue 10998 Change-Id: Ibd6c77af8ed1ce5dc86ce88996003f7cf695aa08 --- tools/bzl/maven_jar.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bzl/maven_jar.bzl b/tools/bzl/maven_jar.bzl index 821e037687..0bad778fe6 100644 --- a/tools/bzl/maven_jar.bzl +++ b/tools/bzl/maven_jar.bzl @@ -147,7 +147,7 @@ def _maven_jar_impl(ctx): out = ctx.execute(args) if out.return_code: - fail("failed %s: %s" % (" ".join(args), out.stderr)) + fail("failed %s: %s" % (args, out.stderr)) srcjar = None if ctx.attr.src_sha1 or ctx.attr.attach_source: From 6804566a022844e66ed1b93e3eba3a898a90ed6f Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sun, 9 Jun 2019 09:03:25 +0200 Subject: [PATCH 2/3] project.py: Add support for bazel wrapper bazelisk Add --bazel option to allow to pass bazelisk. The default value for bazel executable is not changed and is still bazel. Change-Id: I1bc744b741d04f609c2e8b1c3d9144f820cd4f17 --- tools/eclipse/project.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index af36a3f7d6..97008e2fe4 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -51,13 +51,16 @@ opts.add_option('--plugins', help='create eclipse projects for plugins', action='store_true') opts.add_option('--name', help='name of the generated project', action='store', default='gerrit', dest='project_name') +opts.add_option('--bazel', help='name of the bazel executable', + action='store', default='bazel', dest='bazel_exe') + args, _ = opts.parse_args() def retrieve_ext_location(): - return check_output(['bazel', 'info', 'output_base']).strip() + return check_output([args.bazel_exe, 'info', 'output_base']).strip() def gen_bazel_path(): - bazel = check_output(['which', 'bazel']).strip().decode('UTF-8') + bazel = check_output(['which', args.bazel_exe]).strip().decode('UTF-8') with open(path.join(ROOT, ".bazel_path"), 'w') as fd: fd.write("bazel=%s\n" % bazel) fd.write("PATH=%s\n" % environ["PATH"]) @@ -66,7 +69,7 @@ def _query_classpath(target): deps = [] t = cp_targets[target] try: - check_call(['bazel', 'build', t]) + check_call([args.bazel_exe, 'build', t]) except CalledProcessError: exit(1) name = 'bazel-bin/tools/eclipse/' + t.split(':')[1] + '.runtime_classpath' @@ -276,7 +279,7 @@ try: makedirs(path.join(ROOT, gwt_working_dir)) try: - check_call(['bazel', 'build', MAIN, GWT, '//gerrit-patch-jgit:libEdit-src.jar']) + check_call([args.bazel_exe, 'build', MAIN, GWT, '//gerrit-patch-jgit:libEdit-src.jar']) except CalledProcessError: exit(1) except KeyboardInterrupt: From 5a114cd2d9ac05b1f5bf937853ef539823bf3c23 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 10 Jun 2019 09:00:25 +0900 Subject: [PATCH 3/3] Update codemirror-plugin to latest revision on master The plugin doesn't have a stable-2.16 or stable-3.0 branch, and the additional commits on master are not branch specific: - Bazel: Fix lint warning flagged by buildifier - Add .mailmap - Remove CodeMirror modes that are not supported at Google - Add missing top-level LICENSE file Change-Id: I3d60c0a41ef72242f151febe52ab379faa7a5c5f --- plugins/codemirror-editor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/codemirror-editor b/plugins/codemirror-editor index c4cf42b96a..2d3f265ab1 160000 --- a/plugins/codemirror-editor +++ b/plugins/codemirror-editor @@ -1 +1 @@ -Subproject commit c4cf42b96a049a0fb854bcbcb85b56a82d91a009 +Subproject commit 2d3f265ab1797d4179cbd6855c937989175d5ce5