| Summary: | Launch's wait for build logic does not check for autobuild correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Martin Oberhuber <mober.at+eclipse> | ||||
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Michael_Rennie, pawel.1.piech, uwe.st | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | 3.6.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Martin Oberhuber
I see two possible solutions:
(a) put the entire job into background
--> In case of an ongoing long-running build, users won't be explicitly
notified that their Launch is waiting due to the build (and they cannot
cancel the Launch). This would be a change in behavior compared to
earlier versions of Eclipse.
(b) split the Job into 2 separate Jobs (1 for waiting-for-build, the other
for acutually performing the Launch). Perform the wait-for-build job with
progress service like today, but put the launch-job in background. Have
the launch-job joined to the wait-for-build job.
--> For short-running builds, no dialog is shown but for long-running ones
it is shown like today.
I feel like (b) is in line with what end users expect -- no unnecessary notification, but clear notification in case of long-running builds. There might be a small risk that something happens "in-between" the two jobs but I think that this risk is very small and acceptable.
Another option might be putting the entire job into background (like a) but hand-coding a different means of user notification / cancellation for the case that the build runs long.
Created attachment 183630 [details] Patch fixing the issue for autobuild OFF case Closer investigation shows that the Resources plugin uses the AutoBuildJob not only for building, but any kind of resource change notifications even when autobuilding is off. In fact the AutoBuildJob is responsible for broadcasting PRE_BUILD notifications, which are documented in the IResourceChangeEvent Javadocs as occurring "whenever a build would have occurred" [1]. Therefore, when checking whether a build is currently running, it is incorrect to just check whether a job of FAMILY_AUTO_BUILD is scheduled. Attached patch fixes this by also checking IWorkspace.isAutoBuilding(). This is not a perfect solution, but it should alleviate the problem in our product (which has autobuild turned off by default). [1] http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IResourceChangeEvent.html (In reply to comment #2) > This is not a perfect solution, but it should alleviate the problem in our > product (which has autobuild turned off by default). Hi Martin, Thank you for the patch. The fix in the patch should be applied just because, as you described, the check for an autobuild is not sufficient. I committed your fix and renamed this bug to reflect the change. If you think that your suggested solution (b) is still needed for correct behavior, please open a new bug for it. Reviewed and verified behavior. Thanks Pawel. I assume target milestone should be 3.7M4. Can you backport to 3.6.2 ? I can clone a bug for the backporting effort. (In reply to comment #5) > Thanks Pawel. > > I assume target milestone should be 3.7M4. Can you backport to 3.6.2 ? > I can clone a bug for the backporting effort. Right, I forgot to ask you whether you wanted this fix in 3.6.2. It's such a targeted change that I think it's perfectly safe for the maintenance stream. So as you request, I committed the fix for 3.6.x as well. CQ:WIND00235912 It looks like DebugUIPlugin v1.309.2.1 did not get tagged, so it is not yet released into today's M20101201-0800. The fix will need to be released into the Mapfile. (In reply to comment #7) > CQ:WIND00235912 > > It looks like DebugUIPlugin v1.309.2.1 did not get tagged, so it is not yet > released into today's M20101201-0800. The fix will need to be released into the > Mapfile. I have tagged debug.ui as v20101201_r362 |