Skip to content

Commit 725aa0a

Browse files
committed
Build.scala: Remove bootstrapFromPublishedJars setting
I don't think anyone uses it, and it won't be needed anymore once we use dotty as our stage0 compiler, so removing in the name of simplicity.
1 parent 8cce121 commit 725aa0a

File tree

1 file changed

+2
-42
lines changed

1 file changed

+2
-42
lines changed

project/Build.scala

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport._
2727

2828
import scala.util.Properties.isJavaAtLeast
2929

30-
/* In sbt 0.13 the Build trait would expose all vals to the shell, where you
31-
* can use them in "set a := b" like expressions. This re-exposes them.
32-
*/
33-
object ExposedValues extends AutoPlugin {
34-
object autoImport {
35-
val bootstrapFromPublishedJars = Build.bootstrapFromPublishedJars
36-
}
37-
}
38-
3930
object Build {
4031
val scalacVersion = "2.12.8"
4132

@@ -103,8 +94,6 @@ object Build {
10394
// Shorthand for compiling a docs site
10495
val dottydoc = inputKey[Unit]("run dottydoc")
10596

106-
val bootstrapFromPublishedJars = settingKey[Boolean]("If true, bootstrap dotty from published non-bootstrapped dotty")
107-
10897
// Only available in vscode-dotty
10998
val unpublish = taskKey[Unit]("Unpublish a package")
11099

@@ -132,9 +121,6 @@ object Build {
132121

133122
javacOptions in (Compile, compile) ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
134123

135-
// Change this to true if you want to bootstrap using a published non-bootstrapped compiler
136-
bootstrapFromPublishedJars := false,
137-
138124
// Override `runCode` from sbt-dotty to use the language-server and
139125
// vscode extension from the source repository of dotty instead of a
140126
// published version.
@@ -254,41 +240,15 @@ object Build {
254240
// ...but scala-library is
255241
libraryDependencies += "org.scala-lang" % "scala-library" % scalacVersion,
256242

257-
ivyConfigurations ++= {
258-
if (bootstrapFromPublishedJars.value)
259-
Seq(Configurations.ScalaTool)
260-
else
261-
Seq()
262-
},
263-
libraryDependencies ++= {
264-
if (bootstrapFromPublishedJars.value)
265-
Seq(
266-
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
267-
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
268-
).map(_.withDottyCompat(scalaVersion.value))
269-
else
270-
Seq()
271-
},
272-
273243
// Compile using the non-bootstrapped and non-published dotty
274244
managedScalaInstance := false,
275245
scalaInstance := {
276246
import sbt.internal.inc.ScalaInstance
277247
import sbt.internal.inc.classpath.ClasspathUtilities
278248

279249
val updateReport = update.value
280-
var libraryJar = packageBin.in(`dotty-library`, Compile).value
281-
var compilerJar = packageBin.in(`dotty-compiler`, Compile).value
282-
283-
if (bootstrapFromPublishedJars.value) {
284-
val jars = updateReport.select(
285-
configuration = configurationFilter(Configurations.ScalaTool.name),
286-
module = moduleFilter(),
287-
artifact = artifactFilter(extension = "jar")
288-
)
289-
libraryJar = jars.find(_.getName.startsWith("dotty-library_2.12")).get
290-
compilerJar = jars.find(_.getName.startsWith("dotty-compiler_2.12")).get
291-
}
250+
val libraryJar = packageBin.in(`dotty-library`, Compile).value
251+
val compilerJar = packageBin.in(`dotty-compiler`, Compile).value
292252

293253
// All dotty-doc's and compiler's dependencies except the library.
294254
// (we get the compiler's dependencies because dottydoc depends on the compiler)

0 commit comments

Comments
 (0)