Skip to content

Commit

Permalink
bugfix: Don't include target option for PC
Browse files Browse the repository at this point in the history
It's not important for presentation compiler and causes a warning when wrongly paired with release option. It's easier to just ingore it.
  • Loading branch information
tgodzik committed May 14, 2024
1 parent 58c15e0 commit 0500a8c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,12 @@ class CompilerConfiguration(

releaseVersion match {
case Some(version) =>
scalacOptions ++ List("-release", version.toString())
/* Filter out -target: and -Xtarget: options, since they are not relevant and
* might interfere with -release option */
val filterOutTarget = scalacOptions.filter(opt =>
opt.startsWith("-target:") || opt.startsWith("-Xtarget:")
)
filterOutTarget ++ List("-release", version.toString())
case _ => scalacOptions
}
}
Expand Down

0 comments on commit 0500a8c

Please sign in to comment.