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

Bug 347174

Summary: Project is always rebuilt for some toolchains, because rebuild state is not cleared after the build
Product: [Tools] CDT Reporter: Alex Freidin <freidin.alex>
Component: cdt-build-managedAssignee: Project Inbox <cdt-build-managed-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, guy.bonneau, malaperle, yevshif, zulliger
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/#/c/20144
Whiteboard:
Attachments:
Description Flags
A patch clearing rebuild state of the parent toolchain object none

Description Alex Freidin CLA 2011-05-25 11:10:51 EDT
Build Identifier: M20100909-0800

After fixing the bugzilla 318331, the HoldsOptions.needsRebuild() method asks if the parent needs a rebuild. However, after the build is done and HoldsOptions.setRebuildState(false) is called, the parent build state is not cleared in this method, assuming the parent will be called explicitly with setRebuildState(). This, however, does not always happen. 
I observe a situation where a tool has a parent, which is a schema root of this tool, i.e. without random id. Both tools have inputType objects with two different random IDs. The setRebuildState(false) is never called for the inputType belonging to the parent. 
So, perhaps setRebuildState() should also call the parent in the same manner as does needsRebuild()?
This doesn't reproduce in the GNU toolchain, but shows in a custom toolchain. It appears depending on a toolchain definition, because one other custom toolchain doesn't show this problem. 

Reproducible: Always
Comment 1 Alex Freidin CLA 2011-05-25 11:17:55 EDT
Created attachment 196564 [details]
A patch clearing rebuild state of the parent toolchain object
Comment 2 Alex Freidin CLA 2012-03-06 14:26:28 EST
As a result, the project rebuilds every time. The bug appears only for some toolchain definitions. It depends on how the toolchain is defined in plugin.xml.
Comment 3 guy bonneau CLA 2013-12-21 20:38:35 EST
I have this issue as well in a custom toolchain and added my vote to have it fixed.