Skip to content

Commit 48b20eb

Browse files
committed
community-build: Update stdLib213
The standard library can now be compiled with Dotty without any code change, just by starting sbt with `-Dscala.build.compileWithDotty=true`.
1 parent e8bde5e commit 48b20eb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
Submodule stdLib213 updated 398 files

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class CommunityBuildTest {
2424
* @param project The project name, should be a git submodule in community-build/
2525
* @param command The sbt command used to test the project
2626
* @param updateCommand The sbt command used to update the project
27+
* @param extraSbtArgs Extra arguments to pass to sbt
2728
*/
28-
def test(project: String, testCommand: String, updateCommand: String): Unit = {
29+
def test(project: String, testCommand: String, updateCommand: String, extraSbtArgs: Seq[String] = Nil): Unit = {
2930
def log(msg: String) = println(Console.GREEN + msg + Console.RESET)
3031

3132
log(s"Building $project with dotty-bootstrapped $compilerVersion...")
@@ -57,7 +58,7 @@ class CommunityBuildTest {
5758
val pluginFilePath = communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString()
5859

5960
// Run the sbt command with the compiler version and sbt plugin set in the build
60-
val arguments = Seq(
61+
val arguments = extraSbtArgs ++ Seq(
6162
"-sbt-version", "1.2.7",
6263
s"--addPluginSbtFile=$pluginFilePath",
6364
s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! $testCommand"
@@ -74,8 +75,8 @@ class CommunityBuildTest {
7475
| cd community-build/community-projects/$project
7576
| sbt ${arguments.init.mkString(" ")} "${arguments.last}"
7677
|
77-
|For a faster feedback loop, one can try to extract a direct call to dotc from
78-
|usign the sbt export command. For instance, for scalacheck, use
78+
|For a faster feedback loop, one can try to extract a direct call to dotc
79+
|using the sbt export command. For instance, for scalacheck, use
7980
| sbt export jvm/test:compileIncremental
8081
|
8182
|""".stripMargin)
@@ -152,7 +153,8 @@ class CommunityBuildTest {
152153
@Test def stdLib213 = test(
153154
project = "stdLib213",
154155
testCommand = "library/compile",
155-
updateCommand = "library/update"
156+
updateCommand = "library/update",
157+
extraSbtArgs = Seq("-Dscala.build.compileWithDotty=true")
156158
)
157159

158160
// TODO @oderky? It got broken by #5458
@@ -168,6 +170,6 @@ class UpdateCategory
168170

169171
@Category(Array(classOf[UpdateCategory]))
170172
class CommunityBuildUpdate extends CommunityBuildTest {
171-
override def test(project: String, testCommand: String, updateCommand: String): Unit =
172-
super.test(project, updateCommand, null)
173+
override def test(project: String, testCommand: String, updateCommand: String, extraSbtArgs: Seq[String]): Unit =
174+
super.test(project, updateCommand, null, extraSbtArgs)
173175
}

0 commit comments

Comments
 (0)