(I don't think this is caused by anything new in NB 19) I had an embarrassing thing happen this morning when we needed to apply a hotfix at work. (I'm the only one using NetBeans at work)
I had a different branch of the project already loaded, so I closed that and loaded a different copy of the project. I quickly made the required change in NB (removing a couple lines of logging), and then switched to the command line to fiddle with Git and do the build with Gradle. (I had to add some custom options to speed up the build for this hotfix so it was quicker from the command line.) The code failed to compile with many errors that made no sense. A colleague took over and finished the hotfix, but I wondered what went wrong. It turns out that NB removed imports that were needed when I saved. I do want NB to keep my imports in order when I save, but it mistakenly thought it could get rid of a few imports that it had highlighted as not being used. When I merged in the correct change from my colleague, NB still showed these imports as not needed. I wondered what I needed to do to convince it that it was wrong. So I triggered a build of the project from within NB, it built and tested without issues. I watched to see if the "unused imports" indicators would go away. Instead of that happening, it flagged all of the imports from this project as "missing" and marked all of my source files as "needs to be compiled" - I just finished compiling them all!! I expected maybe this would resolve itself in a moment or too after some sort of scan, but no. It's stuck thinking all the project classes are missing, immediately after having just built them all. So I manually triggered a "Reload Project" and that fixed the errors with the missing imports, but NB still marked those few required imports as not being required, and it still shows indicators that every source file needs to be compiled. I just then noticed that the package declaration line had a warning saying "Missing mandatory Classpath entries. Resolve Project Problems." NB thinks I need to do a "Priming Build. It is true that I didn't do a priming build after having loaded this branch of the project . I don't think I was prompted to. What is most annoying is that I have already manually triggered a full build from within NB! That should have resolved the need for doing a priming build, I clearly trust this build script! So I take the hint that NB is giving me and it opens the "Resolve Project Problems" dialog. I select "Priming Build Required" and press the "Resolve..." button. And nothing happens - well the focus changes to the "Description" panel, and there is a very brief message in the status bar that says "Preparing <project name> (<project name>)", but the problem does not go away. Selecting "Reload Project" does nothing as well. I've attached the tail end of messages.log, in case that might give a hint. A restart of NB resolved the issue. This is the sort of experience that makes it hard to convince others how wonderful NB is :-) Regards, Scott
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists