Skip to content

Commit 979ca58

Browse files
committed
Make the sbt scripted tests use the bootstrapped dotty
Also move them to their own project `dotty-sbt-scripted-tests`, because they need to be in a Scala 2.10 project to work correctly, since sbt uses 2.10. The scripted tests can now be run with: > dotty-sbt-scripted-tests/scripted A few of them are broken right now, I'll fix them later (we don't run them on the CI yet).
1 parent e5e53ad commit 979ca58

File tree

582 files changed

+1132
-1376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

582 files changed

+1132
-1376
lines changed

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ val `dotty-library` = Build.`dotty-library`
1111
val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped`
1212
val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge`
1313
val `dotty-sbt-bridge-bootstrapped` = Build.`dotty-sbt-bridge-bootstrapped`
14+
val `dotty-sbt-scripted-tests` = Build.`dotty-sbt-scripted-tests`
1415
val sjsSandbox = Build.sjsSandbox
1516
val `dotty-bench` = Build.`dotty-bench`
1617
val `scala-library` = Build.`scala-library`

project/Build.scala

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -682,17 +682,34 @@ object Build {
682682
lazy val `dotty-sbt-bridge` = project.in(file("sbt-bridge")).
683683
dependsOn(`dotty-compiler`).
684684
settings(commonNonBootstrappedSettings).
685+
settings(dottySbtBridgeSettings)
686+
687+
lazy val `dotty-sbt-bridge-bootstrapped` = project.in(file("sbt-bridge")).
688+
dependsOn(`dotty-compiler-bootstrapped`).
689+
settings(commonBootstrappedSettings).
685690
settings(dottySbtBridgeSettings).
691+
settings(
692+
// Disabled because dotty crashes when compiling the tests
693+
sources in Test := Seq()
694+
)
695+
696+
lazy val `dotty-sbt-scripted-tests` = project.in(file("sbt-scripted-tests")).
697+
settings(
698+
publishArtifact := false
699+
).
686700
settings(ScriptedPlugin.scriptedSettings: _*).
687701
settings(
688702
ScriptedPlugin.sbtTestDirectory := baseDirectory.value / "sbt-test",
689703
ScriptedPlugin.scriptedLaunchOpts := Seq("-Xmx1024m"),
690704
ScriptedPlugin.scriptedBufferLog := false,
691705
ScriptedPlugin.scripted := {
706+
val x0 = (publishLocal in `dotty-sbt-bridge-bootstrapped`).value
692707
val x1 = (publishLocal in `dotty-interfaces`).value
693-
val x2 = (publishLocal in `dotty-compiler`).value
694-
val x3 = (publishLocal in `dotty-library`).value
695-
val x4 = (publishLocal in dotty).value // Needed because sbt currently hardcodes the dotty artifact
708+
val x2 = (publishLocal in `dotty-compiler-bootstrapped`).value
709+
val x3 = (publishLocal in `dotty-library-bootstrapped`).value
710+
val x4 = (publishLocal in `scala-library`).value
711+
val x5 = (publishLocal in `scala-reflect`).value
712+
val x6 = (publishLocal in `dotty-bootstrapped`).value // Needed because sbt currently hardcodes the dotty artifact
696713
ScriptedPlugin.scriptedTask.evaluated
697714
}
698715
// TODO: Use this instead of manually copying DottyInjectedPlugin.scala
@@ -711,26 +728,14 @@ object DottyInjectedPlugin extends AutoPlugin {
711728
scalaVersion := "0.1.1-bin-SNAPSHOT",
712729
scalaOrganization := "ch.epfl.lamp",
713730
scalacOptions += "-language:Scala2",
714-
scalaBinaryVersion := "2.11",
715-
autoScalaLibrary := false,
716-
libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5")
731+
scalaBinaryVersion := "0.1"
717732
)
718733
}
719734
""")
720735
}
721736
*/
722737
)
723738

724-
lazy val `dotty-sbt-bridge-bootstrapped` = project.in(file("sbt-bridge")).
725-
dependsOn(`dotty-compiler-bootstrapped`).
726-
settings(commonBootstrappedSettings).
727-
settings(dottySbtBridgeSettings).
728-
settings(
729-
// Disabled because dotty crashes when compiling the tests
730-
sources in Test := Seq()
731-
)
732-
733-
734739
/** A sandbox to play with the Scala.js back-end of dotty.
735740
*
736741
* This sandbox is compiled with dotty with support for Scala.js. It can be

sbt-bridge/sbt-test/source-dependencies/abstract-type/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/added/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/as-seen-from-a/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/as-seen-from-b/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/backtick-quoted-names/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/binary/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/by-name/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.
Binary file not shown.

sbt-bridge/sbt-test/source-dependencies/canon/lib/a.jar

Lines changed: 0 additions & 1 deletion
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/canon/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/compactify/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/constants/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/default-params/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/dup-class/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/empty-a/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/empty-package/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/erasure/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/export-jars/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

sbt-bridge/sbt-test/source-dependencies/ext/project/DottyInjectedPlugin.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)