Community
Participate
Working Groups
split from 578640: JavaBuilder currently only asks for monitor.isCanceled() which is not enough. Only Jobs which use org.eclipse.core.internal.resources.Workspace.prepareOperation(ISchedulingRule, IProgressMonitor) will activly cancel autobuild (Push notification). Simple Jobs which directly use org.eclipse.core.internal.jobs.JobManager.beginRule(ISchedulingRule, IProgressMonitor) only appear as blocking, They require the blocking tasks to pull notification. AutoBuildJob.isInterrupted() does that pull. But Java builder does not call isInterrupted(). i.e. java builder currently is only interrupted between different builds. A big project autobuild can make some user operations lag.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/191012
I just found ancient discussion on whether JDT should support interrupt or not in bug 89301. The decision there was to not interrupt (short running) autobuild because JDT would lose the incremental state and would need a (long running) full build after interrupt. It has to be checked if that is still the case. If so, it might be wise to only interrupt after a period of grace (like 3 sec) to verify the current autobuild is indeed short running. I mean if the autobuild is long running anyway (sometimes we see ~2min on big projects) it won't matter to restart it with a long running build.
In light of bug 579153, wouldn't this change lead to similar problem?
(In reply to Andrey Loskutov from comment #3) > In light of bug 579153, wouldn't this change lead to similar problem? Absolutely. I am working on a better alternative: Given that the user can currently not cancel autobuild during some operations (for example during UNDO - bug 578871) which can just freezes the UI for minutes i think it is best to autointerrupt after - say 3 sec. Or if we could have a estimate about how long the current autobuild will take we could use that for a decision. It's totally appropriate to interrupt a long running autobuild.
So if you want this be reverted before 4.23 is released, please send a mail ASAP to the platform-dev and eclipse-pmc mailing lists requesting it.