-
Notifications
You must be signed in to change notification settings - Fork 130
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
Current release is compiled for Java 8 but requires Java 9 in bundle manifest #346
Comments
@SethTisue I am aware this is a community project and neither you nor anybody else is the official maintainer. However, maybe you can point me in the right direction. It seems this issue was introduced with the latest release. I have taken a look at all jars released to MVNRepository (https://mvnrepository.com/artifact/com.typesafe.scala-logging/scala-logging) back to 2018, and only in the latest release (3.9.4) the manifest states Java 9 is required when running in an OSGi context:
However, if I clone the repo to my own machine, checkout tag
This points to some sort of build configuration not in the Git repo but in the setup of the build-system – and I don't really know where to look. Hope you can help. |
I wish I had some insight, but this isn't anything I've seen before. |
I found a clue in the manifest. Comparing the manifest for 3.9.3 with the one for 3.9.4 reveals that even though the code was compiled for a 1.8 target (with class file format 52), it seems an Oracle JDK 9 was used for building 3.9.4 wheres AdoptOpenJDK 8 (1.8.0_282) was used for building 3.9.3. See this diff of the MANIFEST.MF files from 3.9.3 and 3.9.4 respctively:
Apart from bumping the version from 3.9.3 to 3.9.4, everything is the same (including the version of Bnd used to create the bundle manifest) except for these two notable differences:
So I am pretty sure, the issue is caused by using Java 9 for producing the released jars for 3.9.4. @analytically Do you have an idea where and how the build is configured? If I can, I will happily help fixing this. |
https://github.com/lightbend/scala-logging/blob/main/.github/workflows/release.yml says Temurin 8, so I suspect the problem is already fixed for the next release. 3.9.4 was July 2021, but #299 didn't land until October 2021. Perhaps Travis-CI was somehow misconfigured for 3.9.4, or perhaps the release was done from @analytically's own machine locally rather than through CI. |
@SethTisue That sounds like a plausible explanation. Thank you for helping. |
about release timing: #407 |
@martingd Has 3.9.5 solved the problem? |
The compiled jars available at
are compiled with class file format for Java 8 but the bundle manifest tells OSGi that Java 9 is required:
The consequence of this is that the jar does not work as a bundle with OSGi running on Java 8.
For comparison, the manifest for
scala-parser-combinators
says:which is what I would expect also in this jar.
If possible I would be happy to assist fixing this issue but I am not sure where the build is configured.
The text was updated successfully, but these errors were encountered: