Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368085 - [backport] 3.7.2: Order mismatch when saving/restoring workspace trees
Summary: [backport] 3.7.2: Order mismatch when saving/restoring workspace trees
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.7.2   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 361675
Blocks:
  Show dependency tree
 
Reported: 2012-01-07 11:07 EST by James Blackburn CLA
Modified: 2012-01-23 08:56 EST (History)
9 users (show)

See Also:
Szymon.Brandys: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2012-01-07 11:07:41 EST
+++ This bug was initially created as a clone of Bug #361675 +++

Build Identifier: I20111021-0800 [3.8 M2]

The recently added enhancement to support multiple build-configurations for a single project requires that workspace element-trees are persisted per each build-configuration.  

There currently are a couple of obvious bugs in the logic that persists/restores these additional workspace element-trees - the trees are restored in the order that does not match the order in which they are persisted.  This results in some very unpredictable build behaviour for projects that do support multiple build-configurations.

I'm attaching a patch that fixes these ordering bugs.  Please let me know if I should provide any more information.

Reproducible: Always
Comment 1 James Blackburn CLA 2012-01-07 11:43:25 EST
+ Szymon for review for backport to 3.7.x.  

The patch for Bug 361675 cherry-pick's nicely onto the 3.7.2 branch.  I think it's a pretty straightforward and safe bugfix to the metadata save and restore logic.

Of particular note:
For serialization: the total number of trees serialized is the same.  Just the ordering is changed: trees for the active configuration are serialized first, followed by trees for all the other configurations (corresponding to the build persistent info order).
For de-serialization: for multi-configuration build, the active config trees are linked first, followed by the 3.7.x+ build persistent infos and trees.  The patch ensures that the tree order is consistent with the builder info order.
Comment 2 Szymon Brandys CLA 2012-01-17 08:19:01 EST
Looks good. James please backport.
Comment 3 James Blackburn CLA 2012-01-17 18:11:30 EST
Thanks Szymon!