-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSGi version range for Guava is too strict #1160
Comments
I'm not really sure what to do here because this is automatically done by the bnd plugin. There is common configuration like descriptions, caffeine/gradle/plugins/src/main/kotlin/lifecycle/java-library-caffeine-conventions.gradle.kts Lines 64 to 77 in 586fe8c
and project-specific like package exports, caffeine/guava/build.gradle.kts Lines 37 to 47 in 586fe8c
The plugin is the one setting the version based on the dependencies, e.g. Export-Package: com.github.benmanes.caffeine.guava;uses:="com.github.b
enmanes.caffeine.cache,com.google.common.cache";version="3.1.9"
Import-Package: com.google.common.cache;version="[32.1,33)",com.google
.common.util.concurrent;version="[32.1,33)",com.github.benmanes.caffe
ine.cache;version="[3.1,4)",com.github.benmanes.caffeine.cache.stats;
version="[3.1,4)" The closest I see their instruction -nodefaultversion to "not add a default version to exported packages when no version is present." I don't know if that's desired or if it would cause more pains? This package could use a very old version of Guava, but I also think keeping the dependency up to date is worthwhile. I guess if we add the version tag ourselves then it won't be computed and we could use an old version as a minimum, like I am not very familiar with osgi and rely on bnd + pax-exam tests to be compliant. Therefore any changes here relies on experts as I'll be ignorant to whether a suggested change is good or bad, which makes me hesitant to muck around too much. |
Yes that should work. Furthermore you don't have to list all packages you need explicitly. You could do something like: |
The minimum version is the first Guava release with JPMS support by including Automatic-Module-Name in the manifest. Also removed workaround for ops4j/org.ops4j.pax.exam#1043
@ben-manes Any chance you can push a new release with the updated jars? We are being hit by the issue again (salesforce/bazel-vscode-java#109) |
Released in 3.2.0 (sorry for the delay) |
In Eclipse we are moving away from having too strict version on package imports for Guava. It caused a quite a few issues over the years. It would be great if the OSGi metadata can be relaxed to only have a lower bound on the Guava package imports.
See eclipse-equinox/equinox#304 (comment) for more details.
The text was updated successfully, but these errors were encountered: