Skip to content

Commit d36c5a3

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 03887b7 commit d36c5a3

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

@@ -107,8 +98,6 @@ object Build {
10798
// Shorthand for compiling a docs site
10899
lazy val dottydoc = inputKey[Unit]("run dottydoc")
109100

110-
lazy val bootstrapFromPublishedJars = settingKey[Boolean]("If true, bootstrap dotty from published non-bootstrapped dotty")
111-
112101
// Only available in vscode-dotty
113102
lazy val unpublish = taskKey[Unit]("Unpublish a package")
114103

@@ -136,9 +125,6 @@ object Build {
136125

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

139-
// Change this to true if you want to bootstrap using a published non-bootstrapped compiler
140-
bootstrapFromPublishedJars := false,
141-
142128
// Override `runCode` from sbt-dotty to use the language-server and
143129
// vscode extension from the source repository of dotty instead of a
144130
// published version.
@@ -268,41 +254,15 @@ object Build {
268254
// ...but scala-library is
269255
libraryDependencies += "org.scala-lang" % "scala-library" % scalacVersion,
270256

271-
ivyConfigurations ++= {
272-
if (bootstrapFromPublishedJars.value)
273-
Seq(Configurations.ScalaTool)
274-
else
275-
Seq()
276-
},
277-
libraryDependencies ++= {
278-
if (bootstrapFromPublishedJars.value)
279-
Seq(
280-
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
281-
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
282-
).map(_.withDottyCompat(scalaVersion.value))
283-
else
284-
Seq()
285-
},
286-
287257
// Compile using the non-bootstrapped and non-published dotty
288258
managedScalaInstance := false,
289259
scalaInstance := {
290260
import sbt.internal.inc.ScalaInstance
291261
import sbt.internal.inc.classpath.ClasspathUtilities
292262

293263
val updateReport = update.value
294-
var libraryJar = packageBin.in(`dotty-library`, Compile).value
295-
var compilerJar = packageBin.in(`dotty-compiler`, Compile).value
296-
297-
if (bootstrapFromPublishedJars.value) {
298-
val jars = updateReport.select(
299-
configuration = configurationFilter(Configurations.ScalaTool.name),
300-
module = moduleFilter(),
301-
artifact = artifactFilter(extension = "jar")
302-
)
303-
libraryJar = jars.find(_.getName.startsWith("dotty-library_2.12")).get
304-
compilerJar = jars.find(_.getName.startsWith("dotty-compiler_2.12")).get
305-
}
264+
val libraryJar = packageBin.in(`dotty-library`, Compile).value
265+
val compilerJar = packageBin.in(`dotty-compiler`, Compile).value
306266

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

0 commit comments

Comments
 (0)