Roiocam commented on PR #1076: URL: https://github.com/apache/incubator-pekko/pull/1076#issuecomment-1916603308
> @Roiocam So I don't want to stop the PR, but I just want to make you aware (if you aren't already) that there generally is an issue with how sbt-osgi interacts with other packaging type of tasks i.e. ssembly,multi-release-jar/jdk9 etc etc when it comes to ordering and there are long discussions on this i.e. How should we solve this problem? In my opinion, the real issue is `sbt-osgi` overwrited the Task( Compile / packageBin), and not calling (Compile / fullClasspath). JDK9 plugin broken by this, and sbt-assembly too. Why sbt-assembly doesn't overwrite packageBin but instead let user choose? I think the `sbt-osgi` should be doing this too. As for `fullClasspath` blocker issue, i think this https://github.com/sbt/sbt-osgi/pull/103 doesn't help. Why not change like this: ```diff lazy val defaultOsgiSettings: Seq[Setting[_]] = { import OsgiKeys._ Seq( + (Compile / exportJars) := false, bundle := Osgi.bundleTask( manifestHeaders.value, additionalHeaders.value, - (Compile / dependencyClasspathAsJars).value.map(_.data) ++ (Compile / products).value, + (Compile / fullClasspath).value.map(_.data) ++ (Compile / internalDependencyAsJars).value.map(_.data), (Compile / packageBin / artifactPath).value, (Compile / resourceDirectories).value, embeddedJars.value, explodedJars.value, failOnUndecidedPackage.value, (Compile / sourceDirectories).value, (Compile / packageBin / packageOptions).value, packageWithJVMJar.value, cacheStrategy.value, streams.value), - Compile / sbt.Keys.packageBin := bundle.value, ``` Let me explain that osgiBundle itself will be packaged thing into the jar, so we could avoid the task graph like `packageBin -> osgiBundle -> fullClasspath -> exportProduct -> packageBin`. As for `internalDependencyAsJars`, because fullClasspath doesn't contain manifest. And the `dependencyClasspathAsJars` just a concat of `internalDependencyAsJars` and `externalDependencyClasspath`. So we could replace them. This should fix the issues of JDK9 and assembly not executing issue, because when we execute osgiBundle, we will execute compile/fullClasspath. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
