jglick opened a new pull request #504: Skip CoS copying of class files when the 
target is already newer, such as from an external compilation
URL: https://github.com/apache/incubator-netbeans/pull/504
   Related to [#227791](https://netbeans.org/bugzilla/show_bug.cgi?id=227791) 
and linked issues. This is a robustness fix: in NetBeans currently, when the 
built-in compiler gets confused during classpath scanning and writes out broken 
class files due to various subtle bugs, as happens pretty frequently in my 
experience on big complex projects, CoS-mode execution (e.g., running of 
individual unit tests in quick mode) is broken because the test JVM loads 
bytecode full of errors (“uncompilable source code” etc.). This is irritating 
because the errors are almost always from classes deep in the dependency tree 
and unrelated to what you are actually editing and testing, yet the problem 
blocks you from using CoS mode and so you must fall back to much slower full 
   With this patch, NetBeans will just trust the external build tool 
preferentially, based on `*.class` timestamp. Thus, if you notice some error 
during a CoS test case run which was caused by an IDE problem, you have a 
simple workaround: just do a command-line rebuild of the module containing the 
class mentioned in the error. You can still make edits to unrelated (source or 
test) files and rerun the test to pick up those changes. I have been running 
with this patch for over a year and it seems to work well; I no longer curse in 
frustration at nbjavac bugs, just note them and move on.
   `java.source.base` is giving me 29 test failures after 20m (!) run time, but 
I picked one at random and confirmed that it was also failing in `master`, so 
at least that one is not a regression. When was the last time `mvn -f 
whatever.module test` actually worked?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:

Reply via email to