-
Notifications
You must be signed in to change notification settings - Fork 278
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
improvement: Add flags to release for JDK 8 #4719
Conversation
ffe47fe
to
a640a8b
Compare
I think this should work, I checked and the class files produced are version 52. I just had a weird issue with javadoc, where the target option would be forwarded to it, which makes no sense, since javadoc doesn't support the same options. I just set the options for it to nil |
26db844
to
84fc5a7
Compare
I think we should be good now. |
@@ -58,9 +58,9 @@ object TestHelpers { | |||
val out1 = x1.formattedCode | |||
val lines2 = x1.formattedCode.count(_ == '\n') | |||
val (duration2, result2) = formatCode(out1) | |||
def saveFormatted(): Unit = Files.writeString( | |||
def saveFormatted(): Unit = Files.write( |
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.
This method and the one below was added in JDK 11, but wasn't an issue for released artifacts since it's in the tests only
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.
should we instead add new flags to the Compile /
so it doesn't affect Test?
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.
I mean, maybe it's better to be consistent here? And the changes are quite small.
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.
sounds good
build.sbt
Outdated
"-target:8", | ||
"-release:8", | ||
) | ||
case _ => Seq("-target:8", "-release:8") |
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.
rather than adding these twice, to each scala version, should we follow the example of unused below and append separately?
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.
sure, done. I at some point I thought those might differ
@@ -58,9 +58,9 @@ object TestHelpers { | |||
val out1 = x1.formattedCode | |||
val lines2 = x1.formattedCode.count(_ == '\n') | |||
val (duration2, result2) = formatCode(out1) | |||
def saveFormatted(): Unit = Files.writeString( | |||
def saveFormatted(): Unit = Files.write( |
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.
should we instead add new flags to the Compile /
so it doesn't affect Test?
).jvmSettings(crossVersion := CrossVersion.disabled, autoScalaLibrary := false) | ||
).jvmSettings( | ||
javacOptions ++= Seq("-source", "8", "-target", "8"), | ||
Compile / doc / javacOptions := Seq(), |
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.
are you sure you still need this for doc? especially if you used the one above with Compile /
?
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.
yeah, it still didn't work without it
No description provided.