Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329592 - Service impls should specify version ranges for all OSGi API related imports.
Summary: Service impls should specify version ranges for all OSGi API related imports.
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Ross CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 16:46 EDT by John Ross CLA
Modified: 2019-09-28 19:04 EDT (History)
2 users (show)

See Also:


Attachments
Application Admin Patch 1 (2.13 KB, patch)
2010-11-09 15:42 EST, John Ross CLA
no flags Details | Diff
Patch for all services 1 (19.12 KB, patch)
2010-12-06 19:41 EST, John Ross CLA
no flags Details | Diff
Patch for all services 2 (19.71 KB, patch)
2010-12-09 16:40 EST, John Ross CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Ross CLA 2010-11-05 16:46:29 EDT
Build Identifier: 

Bug 329452 addressed version ranges for service API imports that bundles also implemented. The floor was the current 4.3 version. The ceiling was the next minor version.

This bug addresses adding version ranges to all OSGi API related imports. Here, the ceiling is the next major version.

Adding version ranges to imports not related to the OSGi API will be addressed in another bug.

For this bug, the floor will be established as follows.

(1)
If an import already specifies a version, that will become the floor.

(2)
If an import does not specify a version, the floor will be the current 4.3 version.

Discovering the lowest valid floor will be addressed in another bug or bugs.

Reproducible: Always
Comment 1 John Ross CLA 2010-11-05 16:46:50 EDT
Tom, would you please assign this to me?
Comment 2 Thomas Watson CLA 2010-11-05 16:52:20 EDT
Gladly done.
Comment 3 BJ Hargrave CLA 2010-11-05 18:08:18 EDT
I think this bug should address adding version ranges to all imported package (where possible) not just the imports of org.osgi.* packages.
Comment 4 Thomas Watson CLA 2010-11-08 09:10:16 EST
(In reply to comment #3)
> I think this bug should address adding version ranges to all imported package
> (where possible) not just the imports of org.osgi.* packages.

Agree, except in cases where we may get the package from the EE.  Unfortunately we still need to use no range here.
Comment 5 BJ Hargrave CLA 2010-11-08 09:27:39 EST
(In reply to comment #4)
> (In reply to comment #3)
> > I think this bug should address adding version ranges to all imported package
> > (where possible) not just the imports of org.osgi.* packages.
> 
> Agree, except in cases where we may get the package from the EE.  Unfortunately
> we still need to use no range here.

That was the "where possible" escape clause. :-D
Comment 6 John Ross CLA 2010-11-09 15:42:05 EST
Created attachment 182771 [details]
Application Admin Patch 1

Okay, I'll use this for all imports and follow the rules for establishing the floor as laid out in the Description (comment 0).

This is a patch for the Application Admin impl, which was not included in Bug 329452 because it should not import the service API it implements (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=329452#c9).

I'll hold off on the rest until Bug 329452 is released in order to avoid overlapping patches.
Comment 7 John Ross CLA 2010-12-06 19:41:48 EST
Created attachment 184680 [details]
Patch for all services 1

Includes the following services.

Application Admin
CM
Device
DS
Event
HTTP
HTTP Servlet
IO
IP
Log
MetaType
Preferences
User Admin
Wire Admin

Tom, some things I'd like to discuss while reviewing the patch.

(1)
The following bundles have javax imports.

HTTP
HTTP Servlet
IO
IP
MetaType

HTTP Servlet and IP specify versions, the others don't. MetaType has org.xml imports with no specified versions.

(2)
I know we discussed, as a default, not to specify the revision number as part of the range. But I left them where already specified just to do a sanity check with you before removing. These were CM, IP, and MetaType.

(3)
Wire Admin had no org.osgi.framework version specified, so i followed the rule and set it to the latest (i.e. 1.6). I'd be amazed, however, if this couldn't be safely set lower, perhaps all the way to 1.0.
Comment 8 John Ross CLA 2010-12-09 16:40:32 EST
Created attachment 184904 [details]
Patch for all services 2

Based on discussions with Tom, this patch incorporates the following changes.

(1)
For WireAdmin, the floor for org.osgi.framework was set to 1.3.

(2)
For HTTP, I set the range of the javax.servlet imports to [2.1,2.6). I left the javax.net import unspecified since that would be provided by the system bundle.

(3)
For HTTP Servlet, I set the ceiling of javax.servlet imports to 2.6.

(4)
For IP, I set the ceiling of javax.servlet imports to 3.0.

(5)
I modified the floor setting strategy as follows. If no version was previously specified, the floor defaults to 1.0 (with the exception of org.osgi.framework).
Comment 9 Thomas Watson CLA 2011-04-25 14:37:59 EDT
Not going to mess with this for 3.7.
Comment 10 Thomas Watson CLA 2011-06-08 11:30:50 EDT
Move all 3.8 bugs to Juno.
Comment 11 Thomas Watson CLA 2012-04-25 11:20:40 EDT
Not happening for Juno.
Comment 12 Thomas Watson CLA 2013-04-24 13:43:16 EDT
Not happening in Kepler.
Comment 13 Eclipse Genie CLA 2019-09-28 19:04:14 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.