Bug 367980 - Support for pre-release versions
Summary: Support for pre-release versions
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2012-01-05 14:49 EST by Thomas Watson CLA
Modified: 2012-01-19 14:39 EST (History)
1 user (show)

See Also:


Attachments
proposed fix (5.72 KB, patch)
2012-01-05 15:09 EST, Thomas Watson CLA
no flags Details | Diff
Updated patch (5.02 KB, patch)
2012-01-06 16:56 EST, 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 2012-01-05 14:49:10 EST
With changes to the Equinox VersionRange class (bug 366419) I am seeing some undesired affects to PDE UI.  In particular the PluginVersionPart is not behaving well.

The code uses VersionRange to parse the ranges, which is good.  But now that VersionRange supports pre-release versions we see some undesired fully qualified versions getting placed in the UI and in the manifest when they should not be.

The following table shows what unqualified version ranges get translated into when fully qualified:

[L,R) => [L-,R-)
[L,R] => [L-,R.]
(L,R) => (L.,R-)
(L,R] => (L.,R.]

These 4 variants should not be fully qualified when placed in the bundle manifest.  This would cause the bundle to stop working on older R4.3 framework implementations since they do not understand the pre-release style versions (e.g. 1.0.0-beta) that use a '-' qualifier separator.

I will attach a patch with a suggested fix.
Comment 1 Thomas Watson CLA 2012-01-05 15:09:00 EST
Created attachment 209099 [details]
proposed fix

I'm still a loser when it comes to creating patches with eGit.  Here is a patch I created with commandline git.  Let me know if you have trouble applying it.
Comment 2 Thomas Watson CLA 2012-01-06 16:56:52 EST
Created attachment 209154 [details]
Updated patch

I went back and had OSGi update the org.osgi.framework.VersionRange class to not include fully qualified versions in VersionRange.toString() unless they are required.

This is an updated patch that takes advantage of that instead of having our own code to print version ranges.  The other changes are still required to avoid displaying fully qualified versions in the dialog for uses to enter in version information unless needed.
Comment 3 Thomas Watson CLA 2012-01-06 16:57:32 EST
BTW the new VersionRange from OSGi was committed to master with:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=80cf0452e3b3c7c425f334a1ee1e361a809008d2
Comment 4 Curtis Windatt CLA 2012-01-18 17:16:09 EST
When do you see the extra info getting put into the manifest?  I can see it in editor (PluginVersionPart), but I don't see any changes being made to the manifest text.

The contributed patch corrects the problems that I did see in the UI.  I have pushed it to master.
Comment 5 Thomas Watson CLA 2012-01-19 14:39:57 EST
Note that I opened bug369141 to revert this fix.