stevedlawrence commented on code in PR #1090:
URL: https://github.com/apache/daffodil/pull/1090#discussion_r1345843918
##########
build.sbt:
##########
@@ -268,28 +272,30 @@ def buildScalacOptions(scalaVersion: String) = {
case _ => Seq.empty
}
- val javaVersionSpecificOptions =
- if (scala.util.Properties.isJavaAtLeast("9"))
- Seq("-release", "8") // ensure Java backwards compatibility
(DAFFODIL-2579)
- else
- Seq.empty
+ commonOptions ++ scalaVersionSpecificOptions
Review Comment:
It loosk like `-target` is deprecated in scala 2.13 in favor of `-release`.
Maybe we should add `-release $minSupportedJavaVersion`, which works on both
scala 2.12 and 2.13?
With scala 2.12.x, `-release` defines minimum JDK compatibility and works
for more than just Java 8, but always creates Java 8 class files.
With scala 2.13.x `-release` defines the same minimum JDK compatibility, but
also creates the same .class version.
So I think `-release` does a reasonable thing for both versions of Scala?
--
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]