Skip to content

Commit 9eb8258

Browse files
committed
Upgrade to sbt 1.2.3
We cannot use sbtVersion.value for compiler-interface and zinc-api-info anymore because sbt 1.2.3 uses Zinc 1.2.2
1 parent 7dc2226 commit 9eb8258

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

project/Build.scala

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ object Build {
530530
// FIXME: Not needed, but should be on the compiler CP
531531
("org.scala-lang.modules" %% "scala-xml" % "1.1.0").withDottyCompat(scalaVersion.value),
532532
"org.scala-lang" % "scala-library" % scalacVersion % "test",
533-
Dependencies.compilerInterface(sbtVersion.value),
533+
Dependencies.`compiler-interface`,
534534
"org.jline" % "jline-reader" % "3.9.0", // used by the REPL
535535
"org.jline" % "jline-terminal" % "3.9.0",
536536
"org.jline" % "jline-terminal-jna" % "3.9.0" // needed for Windows
@@ -799,8 +799,8 @@ object Build {
799799
description := "sbt compiler bridge for Dotty",
800800
resolvers += Resolver.typesafeIvyRepo("releases"), // For org.scala-sbt:api
801801
libraryDependencies ++= Seq(
802-
Dependencies.compilerInterface(sbtVersion.value) % Provided,
803-
(Dependencies.zincApiinfo(sbtVersion.value) % Test).withDottyCompat(scalaVersion.value)
802+
Dependencies.`compiler-interface` % Provided,
803+
(Dependencies.`zinc-api-info` % Test).withDottyCompat(scalaVersion.value)
804804
),
805805
// The sources should be published with crossPaths := false since they
806806
// need to be compiled by the project using the bridge.
@@ -928,6 +928,7 @@ object Build {
928928
// sbt plugin to use Dotty in your own build, see
929929
// https://github.com/lampepfl/dotty-example-project for usage.
930930
lazy val `sbt-dotty` = project.in(file("sbt-dotty")).
931+
enablePlugins(ScriptedPlugin).
931932
settings(commonSettings).
932933
settings(
933934
version := {
@@ -938,7 +939,7 @@ object Build {
938939
// Keep in sync with inject-sbt-dotty.sbt
939940
libraryDependencies ++= Seq(
940941
Dependencies.`jackson-databind`,
941-
Dependencies.compilerInterface(sbtVersion.value)
942+
Dependencies.`compiler-interface`
942943
),
943944
unmanagedSourceDirectories in Compile +=
944945
baseDirectory.value / "../language-server/src/dotty/tools/languageserver/config",
@@ -1253,7 +1254,6 @@ object Build {
12531254

12541255
// FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests
12551256
def asDottyRoot(implicit mode: Mode): Project = project.withCommonSettings.
1256-
disablePlugins(ScriptedPlugin).
12571257
aggregate(`dotty-interfaces`, dottyLibrary, dottyCompiler, dottyDoc, dottySbtBridgeReference).
12581258
bootstrappedAggregate(`scala-library`, `scala-compiler`, `scala-reflect`, scalap, `dotty-language-server`).
12591259
dependsOn(dottyCompiler).
@@ -1263,38 +1263,32 @@ object Build {
12631263
)
12641264

12651265
def asDottyCompiler(implicit mode: Mode): Project = project.withCommonSettings.
1266-
disablePlugins(ScriptedPlugin).
12671266
dependsOn(`dotty-interfaces`).
12681267
dependsOn(dottyLibrary).
12691268
settings(dottyCompilerSettings)
12701269

12711270
def asDottyLibrary(implicit mode: Mode): Project = project.withCommonSettings.
1272-
disablePlugins(ScriptedPlugin).
12731271
settings(dottyLibrarySettings).
12741272
bootstrappedSettings(
12751273
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called.
12761274
scalacOptions in Compile ++= Seq("-sourcepath", (scalaSource in Compile).value.getAbsolutePath)
12771275
)
12781276

12791277
def asDottyDoc(implicit mode: Mode): Project = project.withCommonSettings.
1280-
disablePlugins(ScriptedPlugin).
12811278
dependsOn(dottyCompiler, dottyCompiler % "test->test").
12821279
settings(dottyDocSettings)
12831280

12841281
def asDottySbtBridge(implicit mode: Mode): Project = project.withCommonSettings.
1285-
disablePlugins(ScriptedPlugin).
12861282
dependsOn(dottyCompiler % Provided).
12871283
dependsOn(dottyDoc % Provided).
12881284
settings(dottySbtBridgeSettings)
12891285

12901286
def asDottyBench(implicit mode: Mode): Project = project.withCommonSettings.
1291-
disablePlugins(ScriptedPlugin).
12921287
dependsOn(dottyCompiler).
12931288
settings(commonBenchmarkSettings).
12941289
enablePlugins(JmhPlugin)
12951290

12961291
def asDist(implicit mode: Mode): Project = project.
1297-
disablePlugins(ScriptedPlugin).
12981292
enablePlugins(PackPlugin).
12991293
withCommonSettings.
13001294
dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, dottyDoc).

project/Dependencies.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ object Dependencies {
1010
val `jackson-dataformat-yaml` =
1111
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % jacksonVersion
1212

13-
def compilerInterface(sbtVersion: String) = "org.scala-sbt" % "compiler-interface" % sbtVersion
14-
def zincApiinfo(sbtVersion: String) = "org.scala-sbt" %% "zinc-apiinfo" % sbtVersion
13+
val `compiler-interface` = "org.scala-sbt" % "compiler-interface" % zincVersion
14+
val `zinc-api-info` = "org.scala-sbt" %% "zinc-apiinfo" % zincVersion
1515
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.1.6
1+
sbt.version=1.2.3

project/inject-sbt-dotty.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ unmanagedSourceDirectories in Compile += baseDirectory.value / "../sbt-dotty/src
77
// Keep in sync with `sbt-dotty` config in Build.scala
88
libraryDependencies ++= Seq(
99
Dependencies.`jackson-databind`,
10-
Dependencies.compilerInterface(sbtVersion.value)
10+
Dependencies.`compiler-interface`
1111
)
1212
unmanagedSourceDirectories in Compile +=
1313
baseDirectory.value / "../language-server/src/dotty/tools/languageserver/config"

0 commit comments

Comments
 (0)