-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
EmptyLombokFileObject creates FileObject at root level and break modular builds #1858
Comments
#1572 seems unrelated. First step is to have a self-contained reproduction. Presumably, something involving module-info and enough lombok usage to force new rounds. We're already late on a release so this will have to wait until the next one. |
I think #1572 because the issue say that lobok not works if module-info.java exists. I have tested it with my own annotation processor and use Memory File and it works sample found at: https://gist.github.com/MCMicS/7763a0a9607ebd83adc328fc7ad52867 |
I like to use a memory based file if possible. In your gist, you use the SimpleJavaFileObject. However, in our EmptyLombokFile object, a comment in the code suggests that at least some javac version, presumably 9, can't cope with that. |
This bug report is very confusing to me:
|
In the lombok source repo, there's the directory If you rebuild lombok and actually print what lombok makes (so, at line 362 at src/core/lombok/javac/apt/LombokProcessor.java inject Seems to be working fine. The bug you are describing is evidently dependent on a weirder situation; possibly with one of the modules being read-only somehow, not quite sure how that works. So, what we need is BOTH:
Without further feedback, auto-close at 2018-12-10. |
ok I have test with 1.18.4 and following command works:
But if I add sourcepath (or maven add this paramter) then it will fail:
simple project can be found here: https://github.com/MCMicS/simple-lombok/tree/java-11 |
We just released an edge release. Can you give it a try and report back:
|
After a short test it seems to be fixed. Compiling with Maven works and Intellij also compile the source files correctly. Tested with JJDK 11 and JDK 12 I'll will try a wider test later this day. Only works if annotation path is configured in pom (see #1723 (comment)). In my opinion this issue is fixed because it works if you confiugre the annotation processor path |
Does this work with Java 16, which makes the default to fail illegal access? |
To force a new Round EmptyLombokFileObject is used. This creates a file in root.
It works if you compile without modules. With modular code (moduel-info.java exists) this will result in error.
Why not use the target or generated sources folder for ForceNewRound files?
Or maybe one of them ideas:
Log from lombok.javac.apt.InterceptingJavaFileManager#getJavaFileForOutput I've added:
See Issues: #1723, #1572
The text was updated successfully, but these errors were encountered: