Merge pull request #5251 from steinybot/fix/5250-console-project-scala-2-13

Fix consoleProject for scala 2.13
This commit is contained in:
eugene yokota 2019-11-29 23:02:12 -05:00 committed by GitHub
commit 5377fb98df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View File

@ -488,6 +488,9 @@ object Defaults extends BuildCommon {
clean := clean.dependsOn(cleanIvy).value,
scalaCompilerBridgeBinaryJar := None,
scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeModule(scalaVersion.value),
consoleProject / scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeModule(
appConfiguration.value.provider.scalaProvider.version
),
)
// must be a val: duplication detected by object identity
private[this] lazy val compileBaseGlobal: Seq[Setting[_]] = globalDefaults(

View File

@ -25,7 +25,7 @@ object ConsoleProject {
val (state1, dependencyResolution) =
extracted.runTask(Keys.dependencyResolution, state)
val (_, scalaCompilerBridgeBinaryJar) =
extracted.runTask(Keys.scalaCompilerBridgeBinaryJar, state1)
extracted.runTask(Keys.scalaCompilerBridgeBinaryJar.in(Keys.consoleProject), state1)
val scalaInstance = {
val scalaProvider = state.configuration.provider.scalaProvider
ScalaInstance(scalaProvider.version, scalaProvider.launcher)
@ -50,7 +50,8 @@ object ConsoleProject {
componentProvider = app.provider.components,
secondaryCacheDir = Option(zincDir),
dependencyResolution = dependencyResolution,
compilerBridgeSource = extracted.get(Keys.scalaCompilerBridgeSource),
compilerBridgeSource =
extracted.get(Keys.scalaCompilerBridgeSource.in(Keys.consoleProject)),
scalaJarsTarget = zincDir,
classLoaderCache = state1.get(BasicKeys.classLoaderCache),
log = log

View File

@ -0,0 +1,5 @@
scalaVersion := "2.13.1"
// Send some bogus initial command so that it doesn't get stuck.
// The task itself will still succeed.
consoleProject / initialCommands := "bail!"

View File

@ -0,0 +1 @@
scalaVersion := "2.12.10"

View File

@ -0,0 +1 @@
> consoleProject