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

[BUG] When source contains jooq generated User Defined Type code, lombok fails to compile #3782

Open
superxiao opened this issue Nov 17, 2024 · 0 comments

Comments

@superxiao
Copy link

Describe the bug
Demo repo
The repository contains code generated by jOOQ. It compiles successfully before adding Lombok. After adding Lombok, the annotations are not recognized, resulting in a compilation error. Adding org.jetbrains:annotations as a dependency resolves the issue.

To Reproduce
Demo repo
Run ./gradlew compileJava. The following compilation errors occur:

> Compilation failed; see the compiler output below.
  error: cannot access ApiStatus
    class file for org.jetbrains.annotations.ApiStatus not found
  /home/xiaojian-wang/lombok-jooq-bug-demo/src/main/java/com/example/DemoApplication.java:21: error: cannot find symbol
                log.info("Person ${}", Person.builder().name("John").build().getName());
                                             ^
    symbol:   method builder()
    location: class Person
  /home/xiaojian-wang/lombok-jooq-bug-demo/src/main/java/com/example/DemoApplication.java:21: error: cannot find symbol
                log.info("Person ${}", Person.builder().name("John").build().getName());
                ^
    symbol:   variable log
    location: class DemoApplication
  3 errors

Adding org.jetbrains:annotations as a dependency fixes the compilation. However, before Lombok is added, the project compiles without needing org.jetbrains:annotations.

Expected behavior
Adding Lombok should not introduce new dependencies that are otherwise not required.

Version info (please complete the following information):

  • Lombok version: 1.18.36
  • Platform: Java, Gradle, Ubuntu latest

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant