Commit Graph

13 Commits

Author SHA1 Message Date
Matthias Sohn ff10cd2d81 Update bazel to 6.3.2
With bazel 6.2.0 building the change
I918e308e71fa978c9f25e3fad63c5f2e94ec3be7 fails with this error:

$ bazelisk build all
INFO: Invocation ID: ba94402e-d1db-4920-ad46-58139ef7ca55
INFO: Analyzed target //:all (96 packages loaded, 1961 targets
configured).
INFO: Found 1 target...
ERROR: /Users/xxxxxxx/.cache/bazel/b645215973ac043930fa5900e337e822/external/jetty-util-ajax/jar/BUILD:3:12:
Extracting interface @jetty-util-ajax//jar:jar failed: (Segmentation
fault): ijar failed: error executing command (from target
@jetty-util-ajax//jar:jar)
external/remote_java_tools_darwin_arm64/java_tools/ijar/ijar
external/jetty-util-ajax/jar/jetty-util-ajax-10.0.16.jar ... (remaining
3 arguments skipped)
...

Updating bazel to 6.3.2 fixes this problem.

Release notes for bazel 6.3.2:
https://github.com/bazelbuild/bazel/releases/tag/6.3.2

Change-Id: I4f697b2f9a560732c89e2a0410ae6133e8c382ef
2023-09-22 17:04:18 +02:00
David Ostrovsky 0f071a7bce Bump bazel vesion to 6.2.0
Also demote severity level for bug pattern: PreferredInterfaceType, aka
MutableConstantField: [1] from error to warning.

Also fix DoubleBraceInitialization error prone bug pattern [2].

[1] https://errorprone.info/bugpattern/PreferredInterfaceType
[2] https://errorprone.info/bugpattern/DoubleBraceInitialization

Change-Id: I04b7d0792e67cbc51e3939bd47c2ea13a685cf0d
2023-05-29 18:39:59 +02:00
David Ostrovsky be732c16ab Bazel: Switch to using toolchain resolution for java rules
Bump Bazel version to release 5.0.0. In this new Bazel release,
--incompatible_use_toolchain_resolution_for_java_rules is flipped, that
means that the build must be adapted to toolchain resolution.

Specification toolchain resolution for java rules is here: [1]. Main
tracking Bazel issue is here: [2].

Given that new Bazel release also added support for remote JDK 17, add
experimental support for building with remote JDK 17 to produce major
byte code version 61.

Test Plan:

To build with remote JDK 11 run:

  $ bazel build :all

To build with remote JDK 17 run:

  $ bazel build --config java17 :all

[1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing
[2] https://github.com/bazelbuild/bazel/issues/7849

Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041
2022-01-20 06:40:51 -04:00
David Ostrovsky 19bed3399d Bump bazel version to 4.0.0
Change-Id: I2faa67d5083f23b29f7a434e54c5e17360b1c0fe
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2021-02-07 23:06:25 +01:00
David Ostrovsky 96411d1abb Bazel: Allow to build and run the tests with JDK 15
To avoid JDK specific bugs in future, like Bug: 568950, and given that
upcoming Bazel release 4.0.0 added support to JDK 15 java toolchain,
add definition for remote JDK 15 to WORKSPACE file and add build and
test instructions.

To build and execute the tests with JDK 15 on Linux run:

  $ bazelisk test \
    --java_toolchain=@remote_java_tools_linux//:toolchain_jdk_15 \
    --host_java_toolchain=@remote_java_tools_linux//:toolchain_jdk_15 \
    --javabase=@openjdk15_linux_archive//:runtime \
    --host_javabase=@openjdk15_linux_archive//:runtime \
    //...

To build and execute the tests with JDK 15 on Mac Os X run:

  $ bazelisk test \
    --java_toolchain=@remote_java_tools_darwin//:toolchain_jdk_15 \
    --host_java_toolchain=@remote_java_tools_darwin//:toolchain_jdk_15 \
    --javabase=@openjdk15_darwin_archive//:runtime \
    --host_javabase=@openjdk15_darwin_archive//:runtime \
    //...

To skip the options on the command line, put them in ~/.bazelrc file:

  build --java_toolchain=@remote_java_tools_linux//:toolchain_jdk_15
  build --host_java_toolchain=@remote_java_tools_linux//:toolchain_jdk_15
  build --javabase=@openjdk15_linux_archive//:runtime
  build --host_javabase=@openjdk15_linux_archive//:runtime

Change-Id: I79d5e99f0c731847a82ce7d4c410855434d85f8d
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2020-11-28 23:29:41 +01:00
Marco Miller 920442ff42 Bump Bazel version to 3.5.0
This latest release includes cherry picks, a new feature and some
important changes [1].

[1] https://github.com/bazelbuild/bazel/releases/tag/3.5.0

Change-Id: Ie6966b0b56a351f98cb20b25daf3412740e68562
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
2020-09-03 13:54:24 -04:00
David Pursehouse 916b367c27 Bump Bazel version to 3.1.0
Change-Id: Id58d1603846a88be3493165583adca481c026eed
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2020-04-29 13:53:45 +09:00
David Pursehouse 3851023e08 Bump Bazel version to 3.0.0
Change-Id: I3866b58d3d288f37b1818be5b56d05e8be6ecb0f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2020-04-07 16:11:42 +09:00
David Pursehouse 1d41be7c54 Bump Bazel version to 2.2.0
Change-Id: I889052040f31708c6b8de0cf3c171a04722f7c96
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2020-03-05 13:13:47 +09:00
David Pursehouse 5fd922dfd4 Bump required Bazel version to 2.1.0
Change-Id: I2e4f44a8d591ba26c14189fc46ead0feaef187c3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2020-02-12 18:45:26 +09:00
David Pursehouse 3b704aec70 Bazel: Bump bazel version to 1.0.0
Change-Id: I607915af0556efe8b2fb640e9387029b755d1a7f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-10-11 15:35:26 +02:00
David Ostrovsky cae8d499bc Bazel: Bump minimum supported version to 0.29.0
Change-Id: I069e56deb964624791bb0aa3ae095629adfe3bbb
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-07 15:36:10 +09:00
David Ostrovsky 5ae0d152a9 Use bazelisk to switch between used bazel version
Bazelisk is utility to switch to the right Bazel version, that we
used to have with Buck build tool: [1].

Bazelisk will download the right Bazel version only once and will use
it in subsequent calls:

  $ bazelisk build :release
  2019/06/06 16:22:15 Downloading \
  https://releases.bazel.build/0.26.1/release/bazel-0.26.1-linux-x86_64...

Bazelisk is storing the binaries in user's cache directory: [2], e.g.
on Linux OS:

  $ ls -1 ~/.cache/bazelisk/bin
  bazel-0.26.1-linux-x86_64

* [1] https://github.com/bazelbuild/bazelisk
* [2] https://golang.org/pkg/os/#UserCacheDir

Change-Id: Ia9180fb75f8cc17a0a0232622cf33a13bfad6b60
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-07 15:35:56 +09:00