raboof commented on code in PR #258:
URL: https://github.com/apache/incubator-pekko/pull/258#discussion_r1143748399
##########
project/JdkOptions.scala:
##########
@@ -74,9 +68,7 @@ object JdkOptions extends AutoPlugin {
jdk8home,
fullJavaHomes,
Nil,
- // '-release 8' would be a neater option here, but is currently not an
- // option because it doesn't provide access to `sun.misc.Unsafe` #27079
- (java8home: File) => Seq("-source", "8", "-target", "8",
"-bootclasspath", java8home + "/jre/lib/rt.jar"))
+ (java8home: File) => Seq("-source", "8", "-target", "8"))
Review Comment:
> That is the whole point of the `release` flag, to ensure that both the
bytecode and linked Java lib match the target JDK version.
See https://github.com/scala/scala/pull/9982
You seem to be referring to the scalac flags, but this line is about javac
flags.
Also on javac, indeed that would be the point of the `--release` flag.
However here we use the `-target` flag, which only affects the bytecode and not
the signatures on the classpath.
The "correct" fix would be to use the `--release` flag, but that is not yet
(easily) possible as that does not allow access to `sun.misc.Unsafe`, so it
wouldn't be able to compile
`actor/src/main/java/org/apache/pekko/util/Unsafe.java`. AFAICS that did not
change with https://github.com/scala/bug/issues/12643.
--
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]