Skip to content

Commit

Permalink
limit "release/target 8" option to "compile" task only (workaround fo…
Browse files Browse the repository at this point in the history
…r scalac crash on scaladoc);
  • Loading branch information
greenhat committed Jun 6, 2019
1 parent af92bde commit 647af71
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ lazy val testSettings = Seq(
publishArtifact in Test := true,
publishArtifact in(Test, packageSrc) := true,
publishArtifact in(Test, packageDoc) := false,
// TODO: fix this workaround for compiler crash with "-release 8" (see https://github.com/scala/community-builds/issues/796#issuecomment-423395500)
publishArtifact in(Compile, packageDoc) := false,
test in assembly := {})

libraryDependencies ++= Seq(
Expand All @@ -121,11 +119,16 @@ libraryDependencies ++= Seq(
) ++ testingDependencies


scalacOptions ++= Seq("-feature", "-deprecation",
// to fix NoSuchMethodError for various ByteBuffer methods (see https://github.com/eclipse/jetty.project/issues/3244)
"-release", "8")
scalacOptions ++= Seq("-feature", "-deprecation")


// set bytecode version to 8 to fix NoSuchMethodError for various ByteBuffer methods
// see https://github.com/eclipse/jetty.project/issues/3244
// these options applied only in "compile" task since scalac crashes on scaladoc compilation with "-release 8"
// see https://github.com/scala/community-builds/issues/796#issuecomment-423395500
javacOptions in(Compile, compile) ++= Seq("-target", "8", "-source", "8" )
scalacOptions in(Compile, compile) ++= Seq("-release", "8")

//uncomment lines below if the Scala compiler hangs to see where it happens
//scalacOptions in Compile ++= Seq("-Xprompt", "-Ydebug", "-verbose" )

Expand Down

0 comments on commit 647af71

Please sign in to comment.