-
Notifications
You must be signed in to change notification settings - Fork 87
Fix OSGI exports #225
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
Fix OSGI exports #225
Conversation
Fix OSGI exports so `scala/jdk` classfiles are not removed from the jar.
It's not clear to me how the version is bumped - is that just done by tagging for release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the module should export scala.jdk
only in the 2.11 / 2.12 versions, something like
OsgiKeys.exportPackage := {
if (scalaVersion.value.startsWith("2.13."))
Seq(s"scala.collection.compat.*;version=${version.value}")
else
Seq(s"scala.collection.compat.*;version=${version.value},scala.jdk.*;version=${version.value}")
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further investigation I have to retract my approval. It's still broken in major ways.
The imports in the manifest are wrong. We're currently importing from a SemVer range based on the project's own version. I don't know where this default comes from but it is really bad. Aborting with an error would be a much better default.
We have some code to generate the correct version ranges in Slick: https://github.com/slick/slick/blob/master/project/Osgi.scala
That alone is still not enough though. We have to use different OSGi headers for different Scala versions. Scala 2.13 has a scala.jdk package so we must not export it ourselves on 2.13.
I'll submit my own PR with these fixes.
closing in favour of #226 |
Fix OSGI exports so
scala/jdk
classfiles are not removedfrom the jar.
Fixes #224.