Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355821

Summary: Resource change triggers multiple full builds
Product: [Modeling] TMF Reporter: Carl Wannheden <carl.wannheden>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Holger.Schill, sebastian.zarnekow, sven.efftinge
Version: 2.0.1Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: other   
Whiteboard:
Attachments:
Description Flags
fix and test none

Description Carl Wannheden CLA 2011-08-25 07:35:37 EDT
Build Identifier: I20110613-1736

The scenario is Xtext projects A and B, where B has a dependency on A. If a resource in A is changed the XtextBuilder will sometimes perform two full builds on A and one full build on B (the 2nd full build on A is unexpected).
Provided the resource change causes a full build, two full builds of A will occur if ProjectOpenedOrClosedListener was notified thereof after ProjectClasspathChangeListener.

Reproducible: Sometimes

Steps to Reproduce:
1. Set up Xtext projects A & B where B has dependency on A
2. Make full build triggering resource change in A, e.g. modify manifest
Comment 1 Carl Wannheden CLA 2011-08-25 07:44:08 EDT
Actualy there is no need of two projects - a workspace with only one project is sufficient.

Steps to Reproduce:
1. Create plugin project and add XtextNature
2. Modify manifest
Comment 2 Sebastian Zarnekow CLA 2011-09-12 09:49:58 EDT
Holger, I've some pending changes for the BuildScheduler. I think we should synchronize our efforts for this issue.
Comment 3 Holger Schill CLA 2011-09-13 02:56:12 EDT
Ok. Skype?
Comment 4 Holger Schill CLA 2011-09-13 09:41:30 EDT
Carl,

could you please mention what excatly you changed in the manifest.mf and how you changed the file? Did you use the editor oder just a texteditor?
Comment 5 Holger Schill CLA 2011-09-14 06:37:57 EDT
Created attachment 203328 [details]
fix and test
Comment 6 Holger Schill CLA 2011-09-15 05:38:27 EDT
A review would be welcome. :-)
Comment 7 Sebastian Zarnekow CLA 2011-09-15 06:01:04 EDT
Looks good to me at a first glance.

Two minor remarks: 

1) Would it be possible to extend AbstractParticipatingBuilderTest in the test class. It provides some helper function to validate the build events, e.g. you could override org.eclipse.xtext.builder.impl.AbstractParticipatingBuilderTest.build(IBuildContext, IProgressMonitor) to do the counting stuff.

2) The manifest file that you create in the test seems to miss a ',' in the require-bundle section.
Comment 8 Holger Schill CLA 2011-09-15 07:24:02 EDT
Tnaks for the review. I will change what you figured out and push it to master.
Comment 9 Holger Schill CLA 2011-09-15 07:52:05 EDT
pushed to master
Comment 10 Karsten Thoms CLA 2017-09-19 17:20:05 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 11 Karsten Thoms CLA 2017-09-19 17:31:34 EDT
Closing all bugs that were set to RESOLVED before Neon.0