stevedlawrence commented on code in PR #1535:
URL: https://github.com/apache/daffodil/pull/1535#discussion_r2277377172


##########
build.sbt:
##########
@@ -248,15 +245,13 @@ def buildTestScalacOptions(scalaVersion: String) = {
 }
 
 val javaVersionSpecificOptions = {
-  val releaseOption = // as of Java 11, they no longer accept "-release". Must 
use "--release".
-    if (scala.util.Properties.isJavaAtLeast("11")) "--release" else "-release"
+  // as of Java 11, they no longer accept "-release". Must use "--release".
+  val releaseOption = "--release"
 
   // Java 21 deprecates Java 8 and warns about it.
   // So if you are using Java 21, Java code compilation will specify a newer 
Java version
   // to avoid warnings.
-  if (scala.util.Properties.isJavaAtLeast("11")) Seq(releaseOption, 
minSupportedJavaVersion)
-  else if (scala.util.Properties.isJavaAtLeast("9")) Seq(releaseOption, "8")
-  else Nil // for Java 8 compilation
+  Seq(releaseOption, minSupportedJavaVersion)
 }

Review Comment:
   In `buildScalacOptions` we have this:
   ```scala
       s"-release:$minSupportedJavaVersion", // scala 2.12 can only do Java 8, 
regardless of this setting.
   ```
   We should remove that comment about 2.12 and Java 8, that isn't important 
anymore.



##########
build.sbt:
##########
@@ -248,15 +245,13 @@ def buildTestScalacOptions(scalaVersion: String) = {
 }
 
 val javaVersionSpecificOptions = {

Review Comment:
   Suggest we remove `javaVersionSpecificOptions` and just add `"--release", 
minSupportedJavaVersion` to `commonOptions` in `buildJavacOptions`.  
`--release` should be supported by all future javac versions so there's not 
really a need to separate this out anymore.



-- 
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]

Reply via email to