Hi That worries me.
We have long refused to update the JCR API reference in the parent POM on the grounds to not have a global requirement for JCR 2 API enforced upon all bundles. So, if we can configure the parent POM such, that it also presets the org.slf4j package imports appropriately, I am fine. If we cannot do that, I would not update the parent POM. Otherwise I am even inclined to say that we should remove the slf4j-api from the parent pom’s dependency management. Regards Felix — Felix Meschberger | Principal Scientist | Adobe Am 14.11.2013 um 02:58 schrieb Chetan Mehrotra <[email protected]>: > I have done the required changes as part of SLING-3243. However one > area is pending > > The Sling Parent pom.xml pins the slf4j-api bundle at 1.5.2. To make > use of new varargs support as part of slf4j api 1.7.5 (it now uses JDK > 1.5) we would need to update this version. Note that at binary level > usage of new vararg support does not cause any change. Quoting from > Slf4j site > > --- > Printing methods in the Logger interface now offers variants accepting > varargs instead of Object[]. Given that under the hood, the Java > compiler transforms varargs into an array, this change is totally 100% > no-ifs-or-buts backward compatible with all existing client code. > --- > > However if I change the version in parent then bnd would change the > version range for slf4j api to [1.7,2) from [1.6,2). > > So if any bundle wants to make use of new API and still wants to be > deployed on Sling based system where slf4j API is 1.6.4 then best way > would be to use version macro > > <Import-Package>org.osgi.framework;version="[${version;=-;${@}},${version;+;${@}})"</Import-Package> > > OR > > <Import-Package>org.osgi.framework;version="$<range;[=-,+)>"</Import-Package> > > Note usage of "=-" instead of "==" to decrement the minor version > > Would this be the right way to tackle that or one should use a different way? > > Chetan Mehrotra > > > On Wed, Nov 13, 2013 at 6:42 PM, Felix Meschberger <[email protected]> wrote: >> Sounds reasonable to me. >> >> Regards >> Felix >> >> — >> Felix Meschberger | Principal Scientist | Adobe >> >> >> >> Am 13.11.2013 um 21:17 schrieb Chetan Mehrotra <[email protected]>: >> >>> Currently Sling is packaging 1.6.4 for the slf4j-api. Most recent >>> release is 1.7.5 and has some noteworthy changes [1] including >>> performance, usage of varargs etc. The core API bundle has no >>> compatibility breaking change. >>> >>> Slf4j bundle maps the package exports to bundle version. So with 1.7.5 >>> the packages are exported at 1.7.5 >>> >>> I checked the Import-Package directive of most Sling bundle and all of >>> them have import range from [1.5,2). So should we move to 1.7.5? >>> >>> The steps I see is >>> - Update the slf4j-api, jcl-over-slf4j, log4j-over-slf4j bundle >>> - Ensure that commons log work with both >>> >>> WDYT? >>> >>> Chetan Mehrotra >>> [1] http://www.slf4j.org/news.html >>
