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

NetBeans compile on save does not work with 1.18.0 #1770

Closed
md-5 opened this issue Jul 9, 2018 · 10 comments
Closed

NetBeans compile on save does not work with 1.18.0 #1770

md-5 opened this issue Jul 9, 2018 · 10 comments

Comments

@md-5
Copy link
Contributor

md-5 commented Jul 9, 2018

Using Maven 3.5.0 on NetBeans 8.1, or Maven 3.3.9 on NetBeans 9.0 RC1, the result is the same.

  • Create a file and compile it
  • Observe it being in the class directory
  • Edit the file
  • File is no longer in the class directory

Issue does not occur on 1.16.18 or older versions, but does on all newer versions.

@md-5
Copy link
Contributor Author

md-5 commented Jul 10, 2018

So 4ac941a / #1555 is actually the commit that introduced this bug according to git bisect

@md-5
Copy link
Contributor Author

md-5 commented Jul 10, 2018

Reverting that commit fixes compile on save, but re introduces red warnings all over the IDE itself.
Will investigate further.

@md-5
Copy link
Contributor Author

md-5 commented Jul 10, 2018

Only NetBeans 8.1 is fixed by reverting that commit, not NetBeans 9 RC1

Guessing compile on save uses a different file manager that is not accounted for

@md-5
Copy link
Contributor Author

md-5 commented Jul 10, 2018

Completely disabling the file manager hooking produces results which work everywhere, with the side effect that the dummy force new round file is left behind and the SneakyThrows ASM processing doesn't work - neither of which are issues to me. Unfortunately I can only figure out a way to disable this via a system property and not via the Lombok config which requires an AST to already be created.

My second attempt was to rewrite the FileManager hooking to be much more minimal, and I did this quite simply in a way that worked on Java 8 and Java 10 without any special code for either, unfortunately it did not work on Netbeans compile on save, and I'm not particularly sure how to debug that.

@md-5
Copy link
Contributor Author

md-5 commented Jul 10, 2018

I think the only reason that commit appears to work is because lombok doesn't even run at all when thats reverted....

I give up for now, but advice on a way to implement the option in my first paragraph would be good.

@charphi
Copy link
Contributor

charphi commented Jul 11, 2018

Same as #1577
I've submitted a pull request (#1775 ) just before discovering your comments :)

@lathspell
Copy link

I had the same problems (SpringBoot Devtools not working due to missing class files) and it now works again with NetBeans 9.0 and lombok-edge. Time for a 1.18.3 release before Lombok gets a reputation of mysteriously breaking things?

@kruemelmonstr
Copy link

I can confirm that the fix works for Netbeans 8.2 + JDK 1.8 + Maven 3.5.4. Thanks for the fix!

@asbachb
Copy link

asbachb commented Apr 25, 2019

I guess the bug could be closed?!

@charphi
Copy link
Contributor

charphi commented Apr 26, 2019

Thats ok for me

@md-5 md-5 closed this as completed Apr 29, 2019
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

5 participants