Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368327 - Missing upper bound for Import-Package in org.slf4j.jcl
Summary: Missing upper bound for Import-Package in org.slf4j.jcl
Status: RESOLVED FIXED
Alias: None
Product: Orbit
Classification: Tools
Component: bundles (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: Indigo M6   Edit
Assignee: Gunnar Wagenknecht CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 04:48 EST by Zeb Ford-Reitz CLA
Modified: 2012-01-26 06:41 EST (History)
2 users (show)

See Also:


Attachments
Patch for SLF4J upper bound for JCL, JUL, and Log4J 1.6.1 (2.09 KB, patch)
2012-01-20 11:21 EST, Zeb Ford-Reitz CLA
no flags Details | Diff
Patch for SLF4J upper bound for JCL, JUL, and Log4J 1.6.4 (2.13 KB, patch)
2012-01-20 11:21 EST, Zeb Ford-Reitz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zeb Ford-Reitz CLA 2012-01-11 04:48:29 EST
The org.slf4j.jcl bundle imports SLF4J packages in the version corresponding to the org.slf4j.jcl bundle's version:

Import-Package: org.slf4j;version=1.5.11, org.slf4j.spi;version=1.5.11
Import-Package: org.slf4j;version=1.6.1, org.slf4j.spi;version=1.6.1

This works well in general, but a problem occurs (as documented in bug_351121) when exactly org.slf4j.jcl_1.5.11, org.slf4j.api_1.5.11, and org.slf4j.api_1.6.1 are installed. The problem occurs because org.slf4j.jcl uses the most recent version of org.slf4j.api available, even though there is a minor version number increase (and thus an API breakage that the provider needs to be aware of). This occurs when certain features are combined (SDK + m2e + egit + Jubula was the initial example from bug_351121).

It seems like this would be fixable by setting an upper bound on the Import-Package: (1.5.11, 1.6.0] and (1.6.1, 1.7.0]
Comment 1 Gunnar Wagenknecht CLA 2012-01-12 06:08:23 EST
Note that version 1.5.11 has been pulled from Orbit recently and won't be in any future recommended Orbit releases. Version 1.6.1 is the recommended one for Indigo so Indigo bundles shouldn't use 1.6.1.

Having said that, I think it's ok to put upper version contraints on the SLF4J wrapper bundles. Can you prepare a patch for 1.6.1 as well as the 1.6.4 bundles currently shipped in Orbit?
Comment 2 Gunnar Wagenknecht CLA 2012-01-12 06:09:01 EST
(In reply to comment #1)
> Note that version 1.5.11 has been pulled from Orbit recently and won't be in
> any future recommended Orbit releases. Version 1.6.1 is the recommended one for
> Indigo so Indigo bundles shouldn't use 1.6.1.

"shouldn't use 1.5.11"
Comment 3 Zeb Ford-Reitz CLA 2012-01-20 11:21:27 EST
Created attachment 209834 [details]
Patch for SLF4J upper bound for JCL, JUL, and Log4J 1.6.1
Comment 4 Zeb Ford-Reitz CLA 2012-01-20 11:21:49 EST
Created attachment 209835 [details]
Patch for SLF4J upper bound for JCL, JUL, and Log4J 1.6.4
Comment 5 Zeb Ford-Reitz CLA 2012-01-20 11:27:10 EST
I've added patches for JCL, JUL, and Log4J (1.6.1 and 1.6.4), as those were the most obvious cases. Other possible candidates for upper bounds that spring to mind are org.slf4j.ext and ch.qos.logback.slf4j. I haven't used these bundles, so I haven't had any problems with them. Also, I'm not sure:
 * what exactly org.slf4j.ext is, and 
 * what versions of ch.qos.logback.slf4j I would need to modify.
Comment 6 David Williams CLA 2012-01-20 12:47:25 EST
Assigned to Gunnar since he's listed as the "contact" for this bundle ... will let me assess and commit changes as he sees fit (but, let me know if someone else would be better). 

And ... don't worry Gunnar, its not just you :) ... I need to go through our whole inbox and make sure everything is assigned appropriately.
Comment 7 Gunnar Wagenknecht CLA 2012-01-26 06:41:08 EST
Patch applied. Thanks Zeb!