Bug 527547

Summary: Do not necessarily build whole workspace before debug
Product: [Eclipse Project] Platform Reporter: Mickael Istria <mistria>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: gautier.desaintmartinlacaze, lbullen, sarika.sinha
Version: 4.7Keywords: performance
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Mickael Istria CLA 2017-11-21 06:18:49 EST
LaunchConfiguration contains a line
  ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(buildMonitor, 3));

This can easily constitute a long running blocking operation. Let's assume I have a bunch of Eclipse plugins projects which build quickly, and a non-built JS project that takes age to validate, and a bunch of Maven jobs that would have to resolve depdencies.
If I do run this Launch Configuration to start an Eclipse application made only of my Eclipse plugins, I'll have to wait for ages for the whole workspace build, whereas the actual useful projects of this Launch Configuration are already built.
Comment 1 Mickael Istria CLA 2017-11-21 06:19:18 EST
Tentative for some time in 4.8 stream.
Comment 2 Mickael Istria CLA 2018-02-06 02:29:42 EST
It may be the responsibility of specific Launch Configurations to override it.
The use-case mentioned in comment 0 may be something that's more a PDE issue than a Debug one.
Comment 3 Lucas Bullen CLA 2018-02-08 14:35:42 EST
Are you sure this scenario happens? If so can you give an example. From what I found, The whole workspace only builds due to your given line if the run delegate is not an instance of ILaunchConfigurationDelegate2 or is and instance of ILaunchConfigurationDelegate2 and buildForLaunch returns false.

In your given scenario, the AbstractPDELaunchConfiguraiton will not return false as far as my tracing shows, and will only build the plugins specified in the run configuration.

Also tested this by including a small un-built java project in my workspace with other plugins, running configuration and seeing that the the java project was not built.
Comment 4 Mickael Istria CLA 2018-02-08 15:11:08 EST
Thanks for investigating Lucas. I have to admit that while I often encountered this issue, I don't have checked the details and will look more carefully next time it happens (maybe it was a JUnit Plugin tests or something like that...). I suggest we put this ticket on hold, and I'll add more details when I know better how to reproduce the symptom.