Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313595 - [planner] Encoding could miss singletons
Summary: [planner] Encoding could miss singletons
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 RC2   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 14:20 EDT by Pascal Rapicault CLA
Modified: 2010-05-19 15:35 EDT (History)
1 user (show)

See Also:
leberre: review+
dj.houghton: review+


Attachments
Patch (3.51 KB, patch)
2010-05-19 14:20 EDT, Pascal Rapicault CLA
no flags Details | Diff
Patch (892 bytes, application/octet-stream)
2010-05-19 14:23 EDT, Pascal Rapicault CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2010-05-19 14:20:57 EDT
Created attachment 169172 [details]
Patch

The code in the projector#encode methods reads like that

			createConstraintsForSingleton();

			createMustHave(entryPointIU, alreadyExistingRoots);

Because we encode the singletons before having encoded the entry point and therefore before having encoded every single IU, it is possible to miss some singleton constraints from the encoding. Even though it does not impact us directly (yet), this would still cause problems to callers that would reach into the internals to call the director or even in our competition solver.

The patch is trivial as it just change the order of two lines.
Comment 1 Pascal Rapicault CLA 2010-05-19 14:23:06 EDT
Created attachment 169174 [details]
Patch

The initial patch also contained some undesired contributions.