Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364076 - compiler-plugin does not respect execution environment system packages
Summary: compiler-plugin does not respect execution environment system packages
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Igor Fedorenko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 14:32 EST by Igor Fedorenko CLA
Modified: 2021-04-28 16:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2011-11-17 14:32:02 EST
Unlike JDT compiler inside IDE ("JRE System Library" classpath container, to be precise), tycho compiler plugin does not respect org.osgi.framework.system.packages property and assumes all packages from bootclasspath are fully accessible. This results in compilation errors due to classpath collision between project's own classes and classes that happen to be available from bootclasspath. I'll push the fix along with a unit test shortly.
Comment 1 Jan Sievers CLA 2011-11-18 03:45:30 EST
is this related to bug 362966 ?
Comment 2 Igor Fedorenko CLA 2011-11-18 08:01:14 EST
(In reply to comment #1)
> is this related to bug 362966 ?

Yes, it is related.

On some platforms, like OSX, it is not easily possible to install additional Java versions, so managing bootclasspath access rules is the only way to make sure build does not accidentally use classes that would not be available at runtime.

The other aspect of this is the discrepancy between classpath visibility inside IDE and on command line build. In this particular case I believe IDE provided more sensible behaviour and it makes sense to change Tycho to match it.
Comment 3 Igor Fedorenko CLA 2011-11-19 22:33:47 EST
Implemented. Only packages explicitly listed in bundle runtime execution environment profile will be accessible from JDK libraries(s).

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