Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347174 - Project is always rebuilt for some toolchains, because rebuild state is not cleared after the build
Summary: Project is always rebuilt for some toolchains, because rebuild state is not c...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 11:10 EDT by Alex Freidin CLA
Modified: 2020-09-04 15:16 EDT (History)
5 users (show)

See Also:


Attachments
A patch clearing rebuild state of the parent toolchain object (1.01 KB, patch)
2011-05-25 11:17 EDT, Alex Freidin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.