Bug 346854 - com.google.inject needs to export all packages (and, as "1.2" instead of "2.0")
Summary: com.google.inject needs to export all packages (and, as "1.2" instead of "2.0")
Status: RESOLVED FIXED
Alias: None
Product: Orbit
Classification: Tools
Component: bundles (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: Indigo RC3   Edit
Assignee: David Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 07:03 EDT by Sven Efftinge CLA
Modified: 2011-05-24 20:20 EDT (History)
7 users (show)

See Also:
sven.efftinge: indigo+


Attachments
screen shot showing export changes that were released "accidentally" with spelling fix (178.45 KB, image/png)
2011-05-23 11:34 EDT, David Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2011-05-23 07:03:04 EDT
The manifest of guice has recently been changed, which breaks our code.
We need to have all packages exported (even com.google.inject.internal).
Please change the Manifest.MF accordingly. I'm increasing the priority, because it breaks our build (Indigo) and we are in RC phase right now.

So the export packages section in the Manifest.MF should look like this: 

"""""
Export-Package: com.google.inject;version="1.2";
  uses:="net.sf.cglib.proxy,
   org.aopalliance.intercept,
   com.google.inject.binder,
   com.google.inject.spi,
   com.google.inject.matcher,
   com.google.inject.internal",
 com.google.inject.assistedinject;version="1.2";uses:="com.google.inject.spi,com.google.inject",
 com.google.inject.binder;version="1.2";uses:="com.google.inject",
 com.google.inject.internal;version="1.2";x-internal:=true;
  uses:="net.sf.cglib.reflect,
   net.sf.cglib.proxy,
   com.google.inject.matcher,
   net.sf.cglib.core,
   com.google.inject.spi,
   com.google.inject.binder,
   com.google.inject",
 com.google.inject.matcher;version="1.2",
 com.google.inject.multibindings;version="1.2";uses:="com.google.inject.spi,com.google.inject.binder,com.google.inject",
 com.google.inject.name;version="1.2";uses:="com.google.inject",
 com.google.inject.spi;version="1.2";uses:="org.aopalliance.intercept,com.google.inject.matcher,com.google.inject",
 com.google.inject.throwingproviders;version="1.2";uses:="com.google.inject.binder,com.google.inject",
 com.google.inject.util;version="1.2";uses:="com.google.inject"

"""""
Comment 1 David Williams CLA 2011-05-23 11:32:41 EDT
It appears more than just "internal exports" was changed. I'll attach screen shot, but if I'm looking at the history correctly, some version numbers were changed ... from "2.0.0" to "1.2" ... apparently this was changed by gunnar? After Chris's original commit? 

And, it was definitely surfaced because of fix I made to correct spelling of 'bundeProvider" to 'bundleProvider' ... that is, the "exported version" changes were made in "HEAD" of the branch, but never released to a build ... so when I fixed spelling of symbolic name and released that, it picked up changes to exported versions also. 

We can fix appropriately quickly ... just wanted to get all parties involved to make sure it is fixed correctly. 

What are correct versions to export?
Comment 2 David Williams CLA 2011-05-23 11:34:04 EDT
Created attachment 196353 [details]
screen shot showing export changes that were released "accidentally" with spelling fix
Comment 3 David Williams CLA 2011-05-23 11:44:32 EDT
So, am I looking at the right one? com.google.inject v2_0_0 branch? That's the only branch I see ... no "v1_2" branch ... so, since such a big difference, thought I should ask. 

Is this a case where "2.0" implementation still exports "1.2" spec level of packages?
Comment 4 Dennis Huebner CLA 2011-05-23 11:45:42 EDT
(In reply to comment #1)

> What are correct versions to export?

I think 1.2 for package export is correct, bundle version is 2.0.0.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=304793#c11
Comment 5 David Williams CLA 2011-05-23 12:20:35 EDT
(In reply to comment #4)
> (In reply to comment #1)
> 
> > What are correct versions to export?
> 
> I think 1.2 for package export is correct, bundle version is 2.0.0.
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=304793#c11

Ok ... so, to be sure ... the suggestion in comment #0 does not seem to match what is in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304793#c11

And neither seem to match what eve what in the history of this manifest. 

So, can you (re) confirm what you want? 

A patch would be nice :) ... but I did already commit to branch (but did not release) the version that was in bug 304793#c11 (I did that to be able to 'compare') ... I'm fine with what ever is deemed correct ... just wanted to make sure.
Comment 6 Sven Efftinge CLA 2011-05-23 14:08:55 EDT
Exporting the packages in version "1.2" is ok. The main problem is that certain packages are not being exported at all anymore. We need all packages being exported (even com.google.inject.internal).
Comment 7 David Williams CLA 2011-05-23 14:21:43 EDT
(In reply to comment #6)
> Exporting the packages in version "1.2" is ok. The main problem is that certain
> packages are not being exported at all anymore. We need all packages being
> exported (even com.google.inject.internal).

Ok, that seems to imply the version in comment #0 is preferred ... so I've (attempted) to incorporate that, and released for a build. 

Once ready as an I-build, would appreciate some quick verification before we re-promote another S-build for RC3. 

Thanks,
Comment 8 David Williams CLA 2011-05-23 16:21:09 EDT
The build with this fix is available at 

http://download.eclipse.org/tools/orbit/downloads/drops/I20110523182458/ 

If you would please check to make sure I got it right, as desired, I'd appreciate it. Then I'll promote to an S-build.

Thanks.
Comment 9 David Williams CLA 2011-05-24 12:25:35 EDT
ping. 

Does the google.inject bundle in this build look good?
Comment 10 Dennis Huebner CLA 2011-05-24 15:31:16 EDT
(In reply to comment #9)
> ping. 
> 
> Does the google.inject bundle in this build look good?

Jep, it looks wonderful.
Comment 11 David Williams CLA 2011-05-24 19:43:47 EDT
So, to "wrap up", this bug was initially simply a run-of-the-mill regression caused by bug 346305. 

But in the course of fixing that, discovered that part of the problem was that the bundle had changes in cvs that had never been released for a build. Important changes, originally discussed in bug 304793. 

So that complicated things, since it means the package versions will be "go down" compared with earlier builds/milestones involving this bundle. This is a breaking change, but is critical to fix before our official "released" version, or else there would be risk of having conflicting versions "out in the wild" compared to bundles distributed from else where. 

Thus, any Indigo clients that used "import package" with a version restriction of "2.0" will be broken, and need to adjust to use a version restriction of "1.2" on package imports. 

Clients of "require bundle" will not be effected, since the bundle version is still (correctly) 2.0.0. 

Thanks all,
Comment 12 Miles Parker CLA 2011-05-24 20:19:15 EDT
Do we have the S-build yet? It should work for us, but I want to be able to make sure that my +3 build will work.
Comment 13 Miles Parker CLA 2011-05-24 20:20:27 EDT
Never mind, I assume it is just: http://download.eclipse.org/tools/orbit/downloads/drops/S20110523182458/