Skip to content

Commit

Permalink
Partest uses -release 8
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Jun 9, 2022
1 parent f33a40e commit 1cd6506
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/partest/scala/tools/partest/nest/Runner.scala
Expand Up @@ -453,10 +453,12 @@ class Runner(val testInfo: TestInfo, val suiteRunner: AbstractRunner) {
}

// all sources in a round may contribute flags via // scalac: -flags
// if a javaVersion isn't specified, require the minimum viable using -release 8 to avoid gotcha in CI.
def flagsForCompilation(sources: List[File]): List[String] = {
val perFile = toolArgsFor(sources)("scalac")
if (parentFile.getParentFile.getName == "macro-annot") "-Ymacro-annotations" :: perFile
else perFile
var perFile = toolArgsFor(sources)("scalac")
if (parentFile.getParentFile.getName == "macro-annot") perFile ::= "-Ymacro-annotations"
if (toolArgsFor(sources)("javaVersion", split = false).isEmpty) perFile :::= List("-release", "8")
perFile
}

// inspect sources for tool args
Expand Down

0 comments on commit 1cd6506

Please sign in to comment.