scalacenter / bloop

Bloop is a build server and CLI tool to compile, test and run Scala fast from any editor or build tool.

Home Page:https://scalacenter.github.io/bloop/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically add -release flag to correctly compile Scala code

tgodzik opened this issue · comments

Currently if we use a newer version of Java for Bloop and try to compile with an older JDK we will get proper bytecode generated for Java files as they fork the compilation, however the same will not happen for Scala code.

For that to work we should automatically add --release flag similar to how ScalaCLI does it for all bloop plugins:

  • maven
  • Gradle
  • sbt
  • mill

This also allow us to only run Bloop on JDK 17 and use the improved support from scala-cli/bloop-core (or even migrate to it)

For that to work we should automatically add --release flag similar to how ScalaCLI does it for all bloop plugins:

Do you have a link handy to show where/how scala-cli does it?

For that to work we should automatically add --release flag similar to how ScalaCLI does it for all bloop plugins:

Do you have a link handy to show where/how scala-cli does it?

That is a good question, I can't find it quickly so I asked the team 😓