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

Bug 364095

Summary: dependency resolver does not respect BREE
Product: z_Archived Reporter: Igor Fedorenko <igor>
Component: TychoAssignee: Igor Fedorenko <igor>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarek.przygodzki, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 364221, 364222    
Bug Blocks: 364304    

Description Igor Fedorenko CLA 2011-11-17 19:23:06 EST
Looks like dependency resolver uses current JVM when calculating list of system packages provided. This becomes a problem when compiling against JDK defined by BREE (see bug 362966) and when compiler using bootclasspath access rules (see bug 364076). I'll provide a fix and corresponding tests shortly.
Comment 1 Igor Fedorenko CLA 2011-11-19 22:38:22 EST
Most of the work is done, including changes to target platform configuration and ProjectorResolutionStrategy. 

http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/diff/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java?id=ffd3905192b24032ffc74e71917b1534b0e1a1e9


Still need to do TargetDefinitionResolver.
Comment 2 Tobias Oberlies CLA 2011-11-21 03:27:27 EST
How is this possible at all? I thought that p2 breaks this use case through the a.jre.javase IU hack (cf. bug 346174 and duplicates)
Comment 3 Igor Fedorenko CLA 2011-11-21 07:55:44 EST
(In reply to comment #2)
> How is this possible at all? I thought that p2 breaks this use case through the
> a.jre.javase IU hack (cf. bug 346174 and duplicates)

The new code filters out garbage a.jre IUs provided in p2 repositories, see ResolutionContextImpl.filterJREUIs. Then a proper JRE IU is generated based on the build target execution environment. The proper JRE IU is forced in to the resolved state as one of root IUs. Does this answer your question?
Comment 4 Igor Fedorenko CLA 2011-11-28 23:48:51 EST
Pushed preliminary TargetDefinitionResolver changes to 364095_resolverBREE branch for now. Need to cleanup implementation before merging to master. 

http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/log/?h=364095_resolverBREE
Comment 5 Igor Fedorenko CLA 2012-02-02 07:35:00 EST
Reworked .target resolver to honour project configured execution environment. This completes implementation of dependency resolution execution environment support.

http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=857da0b4884bd1e024012f804546ffc47d2e69de