Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 279622 - The framework exports tracker package at 1.4.2 but should be 1.4.0
Summary: The framework exports tracker package at 1.4.2 but should be 1.4.0
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.5.1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-09 10:23 EDT by Thomas Watson CLA
Modified: 2009-07-28 14:18 EDT (History)
6 users (show)

See Also:
aniefer: review+


Attachments
readme patch (1.60 KB, patch)
2009-06-09 13:27 EDT, Thomas Watson CLA
no flags Details | Diff
patch to the readme patch (1.51 KB, patch)
2009-06-09 13:51 EDT, Thomas Watson CLA
no flags Details | Diff
PDE build test case for exporting same pachage at two different versions (3.32 KB, patch)
2009-07-17 16:20 EDT, Thomas Watson CLA
no flags Details | Diff
manifest patch (778 bytes, patch)
2009-07-17 17:01 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2009-06-09 10:23:31 EDT
The tracker package should export the org.osgi.util.tracker package at version 1.4.0 but in the Galileo release it currently exports the package at version 1.4.2.

At this point in the release it seems very dangerous to downgrade a package export version.
Comment 1 Jeff McAffer CLA 2009-06-09 10:32:34 EDT
agreed that this is very late.  likely would not hurt anyone but...  What are the ramifications of NOT changing?
Comment 2 Thomas Watson CLA 2009-06-09 10:43:56 EDT
The ramifications are that someone use PDE to import the org.osgi.util.tracker package will import the package at the 1.4.2 version.  This will prevent all such bundles to run on a framework that exports the correct 1.4.2 version of the tracker package.  But I really think the risk is too high to change at this point because any new importers of the tracker package will likely be importing at version 1.4.2.  For example, the org.eclipse.equinox.p2.repository bundle imports tracker at the 1.4.2 version.  It is very likely other bundles in Galileo also import at this version.
Comment 3 Thomas Watson CLA 2009-06-09 10:45:42 EDT
(In reply to comment #2)
> The ramifications are that someone use PDE to import the org.osgi.util.tracker
> package will import the package at the 1.4.2 version.  

What I meant to say is that someone using PDE to import (via Import-Package) the org.osgi.util.tracker package will by default import the package at the version specified by the exporter.  In this case that is the 1.4.2 version exported by the org.eclipse.osgi bundle.
Comment 4 Chris Aniszczyk CLA 2009-06-09 10:48:18 EDT
That's correct, PDE will slap a 1.4.2 there because that's what's in the target.
Comment 5 Thomas Watson CLA 2009-06-09 11:01:29 EDT
(In reply to comment #4)
> That's correct, PDE will slap a 1.4.2 there because that's what's in the
> target.
> 

One possibility is to have org.eclipse.osgi export the package twice, once at version 1.4.0 and once at version 1.4.2.  I tried this in my version of org.eclipse.osgi in my workspace and this caused PDE to offer 1.4.0 as the default version to import.  I have no idea how PDE picks the version to use as the default in this case.  I may have just been lucky for PDE to pick the lower versioned export.

We can investigate if this is a viable option in 3.5.1.  No way we can sort out all the ramifications of exporting the package twice to PDE/Build, p2 etc.
Comment 6 BJ Hargrave CLA 2009-06-09 11:13:11 EDT
Your main problem is that anyone building with 3.5 will import tracker at 1.4.2. No other OSGi vendor will export that version. So none of the bundles will run anywhere but Equinox 3.5. I think this is a big problem!

At the very least you will need to point out this issue to users. If this is not fixed now, how can you possibly downgrade the version in 3.5.1?
Comment 7 Thomas Watson CLA 2009-06-09 11:18:18 EDT
(In reply to comment #6)
> At the very least you will need to point out this issue to users. If this is
> not fixed now, how can you possibly downgrade the version in 3.5.1?
> 

Well we will not be able to really downgrade it.  Only export it at the correct 1.4.0 version and 1.4.2 version and make it so that PDE defaults to importing at the 1.4.0 version.
Comment 8 BJ Hargrave CLA 2009-06-09 11:40:24 EDT
(In reply to comment #7)

> Well we will not be able to really downgrade it.  Only export it at the correct
> 1.4.0 version and 1.4.2 version and make it so that PDE defaults to importing
> at the 1.4.0 version.
> 

Well that still does not help anyone who builds bundles with PDE in 3.5 that don't run on other frameworks.

Also, what happens when OSGi does provide a 1.4.1 or 1.4.2 version of the tracker package?
Comment 9 Thomas Watson CLA 2009-06-09 11:45:52 EDT
(In reply to comment #8)
> 
> Well that still does not help anyone who builds bundles with PDE in 3.5 that
> don't run on other frameworks.

I agree, but it is too late to change at this point.

> 
> Also, what happens when OSGi does provide a 1.4.1 or 1.4.2 version of the
> tracker package?
> 

If OSGi moves to 1.4.1 then we will have to export 1.4.1 and 1.4.2.  If they move to 1.4.2 or higher then we can move back to exporting only one version of the package.
Comment 10 Thomas Watson CLA 2009-06-09 13:27:59 EDT
Created attachment 138693 [details]
readme patch
Comment 11 Thomas Watson CLA 2009-06-09 13:29:46 EDT
Kim, can you release this readme change?
Comment 12 Kim Moir CLA 2009-06-09 13:41:39 EDT
The patch to the readme has been released.
Comment 13 BJ Hargrave CLA 2009-06-09 13:43:35 EDT
(In reply to comment #10)
> Created an attachment (id=138693) [details]
> readme patch
> 

There are a couple of problems with the patch.

1) It should say OSGi Release 4 Version 4.2 (the release is plain 4, version is 4.2)

2) The bug link is wrong:

> (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=230146">279622</a>)

The link is for bug 230146, not this bug!
Comment 14 Thomas Watson CLA 2009-06-09 13:51:48 EDT
Created attachment 138695 [details]
patch to the readme patch

Thanks BJ.  Here is a patch to correct the readme.
Comment 15 Thomas Watson CLA 2009-07-17 16:20:42 EDT
Created attachment 141925 [details]
PDE build test case for exporting same pachage at two different versions
Comment 16 Andrew Niefer CLA 2009-07-17 16:37:43 EDT
I released the test patch to pde.build.tests
Comment 17 Thomas Watson CLA 2009-07-17 17:01:24 EDT
Created attachment 141929 [details]
manifest patch

This patch exports the tracker package twice from org.eclipse.osgi.  Once at 1.4.0 and once at 1.4.2.
Comment 18 Thomas Watson CLA 2009-07-17 17:04:47 EDT
I released the manifest patch to HEAD and will verify the nightly build succeeds.  Given that PDE-Build passes the new testcase Andrew released I do not foresee an issue at build time.

Andrew, please review patch for 3.5.1.
Comment 19 Andrew Niefer CLA 2009-07-28 14:02:22 EDT
ok for 3.5.1
Comment 20 Thomas Watson CLA 2009-07-28 14:18:05 EDT
Fixed for 3.5.1.