Bug 368253 - remove org.eclipse.core.runtime.compatibility.auth dependency from org.eclipse.core.runtime
Summary: remove org.eclipse.core.runtime.compatibility.auth dependency from org.eclips...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 355430
  Show dependency tree
 
Reported: 2012-01-10 09:35 EST by Kim Moir CLA
Modified: 2012-01-10 11:51 EST (History)
3 users (show)

See Also:


Attachments
compile error log from 4.2 test build (6.32 KB, text/html)
2012-01-10 09:37 EST, Kim Moir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Moir CLA 2012-01-10 09:35:37 EST
I've been running builds to test the 4.2 build as the primary build (bug 355430).  One of the issues I identified is that the org.eclipse.core.runtime.compatibility.auth bundle isn't included in the rcp feature. I've talked to John in bug 355430 comment 9 and he said it should be removed. However, the core.runtime bundle still lists it as an optional dependency for this bundle in its manifest.  

Require-Bundle: org.eclipse.osgi;bundle-version="[3.7.0,4.0.0)";visibi^M
 lity:=reexport,org.eclipse.equinox.common;bundle-version="[3.6.100,4.^M
 0.0)";visibility:=reexport,org.eclipse.core.jobs;bundle-version="[3.2^M
 .0,4.0.0)";visibility:=reexport,org.eclipse.equinox.registry;bundle-v^M
 ersion="[3.4.0,4.0.0)";visibility:=reexport,org.eclipse.equinox.prefe^M
 rences;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,org.eclips^M
 e.core.contenttype;bundle-version="[3.3.0,4.0.0)";visibility:=reexpor^M
==> t,org.eclipse.core.runtime.compatibility.auth;bundle-version="[3.2.0,^M
 4.0.0)";resolution:=optional,org.eclipse.equinox.app;bundle-version="^M
 1.0.0";visibility:=reexport^M

The fact that the compatibility auth bundle is missing results in compile errors in core.runtime, I'll attach it.
Comment 1 Kim Moir CLA 2012-01-10 09:37:57 EST
Created attachment 209262 [details]
compile error log from 4.2 test build
Comment 2 John Arthorne CLA 2012-01-10 10:01:21 EST
I see what's going on. The dependency is optional, and at runtime we catch the the linkage error if the bundle is not present. But there is still a compile-time dependency. I think we still want to keep the optional dependency to allow someone to insert that bundle if they need it. I'll see if I can convert the references to reflective access to avoid even the compile-time reference.
Comment 3 John Arthorne CLA 2012-01-10 11:30:05 EST
Fix:

http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=141a5960077ceb94e56327de6dc5e16ff59e7a3b

I switched access to use reflection, but left the optional import in place. There is no longer any compile-time dependency on runtime.compatibility.auth. I also removed dependencies from org.eclipse.core.tests.runtime. This involved deleting some tests that were testing details of the Cipher implementation. There are still some remaining tests that test this functionality at the API level. These API tests will fail if runtime.compatibility.auth is not present but I want to leave them in place until we at least get some test builds running.
Comment 4 Paul Webster CLA 2012-01-10 11:33:54 EST
I might not have understood maven+tycho but I thought that this can cause a problem during build (based on the LTS prototype).  We asked tycho to make optional dependencies available at compile time, because most of our bundles are set up to compile with the optional deps.

Maybe it's not a problem if you can exclude it specifically in the pom.xml

I guess we'll find out :-)

PW
Comment 5 John Arthorne CLA 2012-01-10 11:51:30 EST
I'd be surprised if we didn't have other cases of optional dependencies that we don't have at compile-time, especially in Equinox. But yes, I guess we'll see if this causes a build problem.