Bug 578640 - *cancel* autobuild when user wants to interrupt it.
Summary: *cancel* autobuild when user wants to interrupt it.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.23   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.23 M3   Edit
Assignee: Jörg Kubitz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 578725
Blocks: 578578
  Show dependency tree
 
Reported: 2022-02-08 09:12 EST by Jörg Kubitz CLA
Modified: 2022-03-08 13:29 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2022-02-08 09:12:34 EST
split of from bug 578578:

The existing interrupt() is not hard enough - it does only stop the autobuild loop but let the builder finish it's job - which can be a long time for big projects. 

The java build for example only looks at the IProgressMonitor in BuildNotifier.checkCancelWithinCompiler()

The xtext builder instead looks at isInterrupted in XtextBuilder.shouldCancelBuild()


We should either improve java builder to listen for interrupted or simply call cancel on the autobuildjob.
Comment 1 Eclipse Genie CLA 2022-02-08 09:18:20 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/190567
Comment 3 Jörg Kubitz CLA 2022-02-10 03:00:11 EST
cancels the autobuild on interrupt
Comment 4 Jörg Kubitz CLA 2022-03-08 12:34:38 EST
*I think it would be better to revert this change*

Today i tested https://bugs.eclipse.org/bugs/show_bug.cgi?id=578874#c2 and found that this change may have negative impact: if the user cancels a JDT build the next autobuild will be a full build, because jdt is not able to resume a canceled autobuild.

With this change the auto-interrupt was elevated to a cancel. It may not what the user wants. I was not aware that there was a reason to not use autointerrupt JDT build.

I think it would be better to revert this change and have a more thoughtful look from JDTs side what can be done (grace period?) in bug 578874.
WDYT?
Comment 5 Andrey Loskutov CLA 2022-03-08 12:47:04 EST
(In reply to Jörg Kubitz from comment #4)
> *I think it would be better to revert this change*
> 
> Today i tested https://bugs.eclipse.org/bugs/show_bug.cgi?id=578874#c2 and
> found that this change may have negative impact: if the user cancels a JDT
> build the next autobuild will be a full build, because jdt is not able to
> resume a canceled autobuild.
> 
> With this change the auto-interrupt was elevated to a cancel. It may not
> what the user wants. I was not aware that there was a reason to not use
> autointerrupt JDT build.

Please create dedicated bug for that & proceed with revert. Full build after cancel is surely too much.