Skip to content

Commit f575444

Browse files
authored
Merge pull request #6137 from dotty-staging/update-stdlib213
community-build: Update stdLib213
2 parents ac7e226 + 24a2d6f commit f575444

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
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
}

project/Build.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,9 @@ object Build {
918918
(publishLocal in `dotty-compiler-bootstrapped`).value
919919
(publishLocal in `sbt-dotty`).value
920920
(publishLocal in `dotty-bootstrapped`).value
921-
val pluginText = s"""addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "$sbtDottyVersion")"""
921+
val pluginText =
922+
s"""updateOptions in Global ~= (_.withLatestSnapshots(false))
923+
|addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "$sbtDottyVersion")""".stripMargin
922924
IO.write(baseDirectory.value / "sbt-dotty-sbt", pluginText)
923925
IO.write(baseDirectory.value / "dotty-bootstrapped.version", dottyVersion)
924926
},

0 commit comments

Comments
 (0)