question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel project with Lombok fails to build on Bazel 4.0.0 rc10

See original GitHub issue

Description of the problem / feature request:

I have a java project that uses Project Lombok. Currently it is building with bazel v3.7.2 but when I try to upgrade to bazel v4.0.0rc10, the build errors out because it cannot find symbols that are being generated by lombok.

Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone https://github.com/bradsherman/examples.git
cd examples/java-tutorial
git checkout lombok-bazel
wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-installer-linux-x86_64.sh
chmod +x bazel-3.7.2-installer-linux-x86_64.sh
./bazel-3.7.2-installer-linux-x86_64.sh --user
~/bin/bazel run //:ProjectRunner
# builds, prints out "Hi!", then "Test"

wget https://releases.bazel.build/4.0.0/rc10/bazel-4.0.0rc10-installer-linux-x86_64.sh
chmod +x bazel-4.0.0rc10-installer-linux-x86_64.sh
./bazel-4.0.0rc10-installer-linux-x86_64.sh --user
~/bin/bazel run //:ProjectRunner
# build error out "cannot find symbol"

What operating system are you running Bazel on?

Ubuntu 18.04

What’s the output of bazel info release?

release 4.0.0rc10

What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

https://github.com/bradsherman/examples.git 4183fc709c26a00366665e2d60d70521dc0b405d 22236db1d29e75a8165a94f5dc9cb10ff890480c

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
illicitonioncommented, Jan 21, 2021

Would it be possible to add an attribute or tag or similar to disable turbine for individual targets, rather than at a whole-build level? It’d be nice to get most of the speed-up, and only fall back to ijar where it’s really necessary.

2reactions
manuelnaranjocommented, May 12, 2021

We’ve created some rules that do delombok: https://github.com/bookingcom/rules_lombok_java_library

And we have a sample project that shows usage as well based on the examples shared on this thread

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lombok Annotations not processing in tests - Bazel
I am trying to use Lombok for a project along with Bazel. The Lombok annotations are not resolved in the test files.
Read more >
Java 9 compiler breaks Project Lombok - Google Groups
It seems that Bazel uses the Java 9 compiler internally. This breaks my favorite time-saving annotations from Project Lombok. The bug report is...
Read more >
Building with Bazel - Gerrit Code Review
Bazelisk is a version manager for Bazel, similar to how nvm manages npm versions. It takes care of downloading and installing Bazel itself, ......
Read more >
基于google Bazel 编译和打包springboot项目- 优质转载
Bazel google开源的一个多语言编译工具,可以编译cpp、go、java等语言,通过定义WORKSPACE和BUILD文件进行编译。
Read more >
[SOLVED] Problem with moby packages when installing ...
Recently this stopped working and now fails as follows: ... Package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found