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

Bug 313595

Summary: [planner] Encoding could miss singletons
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: leberre
Version: 3.6Flags: leberre: review+
dj.houghton: review+
Target Milestone: 3.6 RC2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch
none
Patch none

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.