Skip to content

Commit 7631de0

Browse files
committed
stop injecting sbt-dotty
1 parent 9bd5618 commit 7631de0

Some content is hidden

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

56 files changed

+71
-77
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ bench/compile.txt
8585
vscode-dotty/.vscode-test
8686

8787
community-build/scala3-bootstrapped.version
88+
community-build/sbt-injected-plugins
8889
community-build/sbt-dotty-sbt
8990
community-build/sbt-scalajs-sbt
9091
community-build/dotty-community-build-deps

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "community-build/community-projects/algebra"]
2-
path = community-build/community-projects/algebra
3-
url = https://github.com/dotty-staging/algebra
41
[submodule "community-build/community-projects/betterfiles"]
52
path = community-build/community-projects/betterfiles
63
url = https://github.com/dotty-staging/better-files
Submodule AsyncFile updated 28 files
Submodule Lucre updated 326 files
Submodule Monocle updated 110 files
Submodule ScalaPB updated 652 files
Submodule akka updated 1306 files
Lines changed: 0 additions & 1 deletion
This file was deleted.
Submodule cats updated 298 files
Submodule fs2 updated 307 files
Submodule play-json updated 78 files
Submodule protoquill updated 422 files
Submodule scala-xml updated 115 files
Submodule scalatest updated 244 files
Submodule scalaz updated 119 files
Submodule scodec updated 85 files
Submodule scodec-bits updated 31 files
Submodule sconfig updated 230 files
Submodule spire updated 128 files
Submodule zio updated 716 files

community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait CommunityBuildRunner:
3434
/** Build the given project with the published local compiler and sbt plugin.
3535
*
3636
* This test reads the compiler version from community-build/dotty-bootstrapped.version
37-
* and expects community-build/sbt-dotty-sbt to set the compiler plugin.
37+
* and expects community-build/sbt-injected-plugins to set any necessary plugins.
3838
*
3939
* @param project The project name, should be a git submodule in community-build/
4040
* @param command The binary file of the program used to test the project – usually

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lazy val testedCompilerVersion: String =
1313
lazy val sbtPluginFilePath: String =
1414
// Workaround for https://github.com/sbt/sbt/issues/4395
1515
new File(sys.props("user.home") + "/.sbt/1.0/plugins").mkdirs()
16-
communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString()
16+
communitybuildDir.resolve("sbt-injected-plugins").toAbsolutePath().toString()
1717

1818
def log(msg: String) = println(Console.GREEN + msg + Console.RESET)
1919

@@ -281,12 +281,6 @@ object projects:
281281
requiresExperimental = true,
282282
)
283283

284-
lazy val algebra = SbtCommunityProject(
285-
project = "algebra",
286-
sbtTestCommand = "coreJVM/compile",
287-
sbtDocCommand = forceDoc("coreJVM")
288-
)
289-
290284
lazy val scalacheck = SbtCommunityProject(
291285
project = "scalacheck",
292286
sbtTestCommand = "jvm/test;js/test",
@@ -364,7 +358,7 @@ object projects:
364358

365359
lazy val scalaPB = SbtCommunityProject(
366360
project = "ScalaPB",
367-
sbtTestCommand = "dotty-community-build/compile",
361+
sbtTestCommand = "lensesJVM3/compile; runtimeJVM3/compile; grpcRuntimeJVM3/compile; compilerPluginJVM3/compile",
368362
// aggregateDoc("runtimeJVM")("scalapbc", "grpcRuntime", "compilerPlugin") fails with
369363
// module class ScalaPbCodeGenerator$ has non-class parent: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module protocbridge),ProtocCodeGenerator)
370364
// Also it seems that we do not handle correctly aggreagation projects
@@ -441,6 +435,7 @@ object projects:
441435
project = "zio",
442436
sbtTestCommand = "testJVMDotty",
443437
sbtDocCommand = forceDoc("coreJVM"),
438+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
444439
dependencies = () => List(izumiReflect)
445440
)
446441

@@ -467,12 +462,13 @@ object projects:
467462
sbtTestCommand = "unitTests/test",
468463
// Adds <empty> package
469464
sbtDocCommand = "coreJVM/doc",
465+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
470466
dependencies = () => List(munit, scodecBits),
471467
)
472468

473469
lazy val scalaParserCombinators = SbtCommunityProject(
474470
project = "scala-parser-combinators",
475-
sbtTestCommand = "parserCombinatorsJVM/test",
471+
sbtTestCommand = "set every versionPolicyIntention := Compatibility.None; parserCombinatorsJVM/test",
476472
sbtDocCommand = forceDoc("parserCombinatorsJVM"),
477473
)
478474

@@ -511,7 +507,7 @@ object projects:
511507

512508
lazy val catsEffect3 = SbtCommunityProject(
513509
project = "cats-effect-3",
514-
sbtTestCommand = "test",
510+
sbtTestCommand = "ciJVM",
515511
sbtPublishCommand = "publishLocal",
516512
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
517513
dependencies = () => List(cats, coop, disciplineSpecs2, scalacheck)
@@ -551,6 +547,7 @@ object projects:
551547
project = "discipline",
552548
sbtTestCommand = "coreJVM/test;coreJS/test",
553549
sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal",
550+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
554551
dependencies = () => List(scalacheck)
555552
)
556553

@@ -678,9 +675,9 @@ object projects:
678675

679676
lazy val scissLucre = SbtCommunityProject(
680677
project = "Lucre",
681-
sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;expr0JVM/test;expr1JVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test",
678+
sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test",
682679
extraSbtArgs = List("-Dde.sciss.lucre.ShortTests=true"),
683-
sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;expr0JVM/publishLocal;expr1JVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal",
680+
sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal",
684681
dependencies = () => List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest),
685682
)
686683

@@ -703,6 +700,7 @@ object projects:
703700
project = "akka",
704701
extraSbtArgs = List(s"-Dakka.build.scalaVersion=$testedCompilerVersion"),
705702
sbtTestCommand = "set every targetSystemJdk := true; akka-actor-tests/Test/compile",
703+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
706704
dependencies = () => List(scalatest, scalatestplusJunit, scalatestplusScalacheck)
707705
)
708706

@@ -714,9 +712,10 @@ object projects:
714712

715713
lazy val protoquill = SbtCommunityProject(
716714
project = "protoquill",
717-
sbtTestCommand = "test",
715+
extraSbtArgs = List("-Dcommunity=true", "-DcommunityRemote=true", "-Dquill.macro.stdout=true"),
716+
sbtTestCommand = "runCommunityBuild",
718717
sbtPublishCommand = "publishLocal",
719-
dependencies = () => List(), // TODO add scalatest and pprint (see protoquill/build.sbt)
718+
dependencies = () => List(scalatest),
720719
scalacOptions = List("-language:implicitConversions"), // disabled -Ysafe-init, due to bug in macro
721720
)
722721

@@ -750,8 +749,8 @@ object projects:
750749

751750
lazy val fs2 = SbtCommunityProject(
752751
project = "fs2",
753-
sbtTestCommand = "coreJVM/test; coreJS/test", // io/test requires JDK9+
754-
sbtPublishCommand = "coreJVM/publishLocal; coreJS/publishLocal",
752+
sbtTestCommand = """set coreJVM/scalacOptions -= "-Xfatal-warnings"; coreJVM/test; set coreJS/scalacOptions -= "-Xfatal-warnings"; coreJS/test""", // io/test requires JDK9+
753+
sbtPublishCommand = """set coreJVM/scalacOptions -= "-Xfatal-warnings"; coreJVM/publishLocal; set coreJS/scalacOptions -= "-Xfatal-warnings"; coreJS/publishLocal""",
755754
dependencies = () => List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits)
756755
)
757756

@@ -780,6 +779,7 @@ object projects:
780779
project = "spire",
781780
sbtTestCommand = "test",
782781
sbtPublishCommand = "publishLocal",
782+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
783783
dependencies = () => List(cats, disciplineMunit)
784784
)
785785

@@ -815,7 +815,6 @@ def allProjects = List(
815815
projects.cask,
816816
projects.scas,
817817
projects.intent,
818-
projects.algebra,
819818
projects.scalacheck,
820819
projects.scalacheckForwardCompat,
821820
projects.scalatest,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ class CommunityBuildTestB:
4343
@Test def disciplineMunit = projects.disciplineMunit.run()
4444
@Test def disciplineSpecs2 = projects.disciplineSpecs2.run()
4545
@Test def fs2 = projects.fs2.run()
46+
@Test def monocle = projects.monocle.run()
4647
@Test def munit = projects.munit.run()
4748
@Test def munitCatsEffect = projects.munitCatsEffect.run()
4849
@Test def perspective = projects.perspective.run()
4950
@Test def scalacheckEffect = projects.scalacheckEffect.run()
5051
@Test def scodec = projects.scodec.run()
5152
@Test def scodecBits = projects.scodecBits.run()
52-
@Test def monocle = projects.monocle.run()
5353
@Test def simulacrumScalafixAnnotations = projects.simulacrumScalafixAnnotations.run()
54+
@Test def spire = projects.spire.run()
5455
end CommunityBuildTestB
5556

5657
@Category(Array(classOf[TestCategory]))
5758
class CommunityBuildTestC:
5859
@Test def akka = projects.akka.run()
59-
@Test def algebra = projects.algebra.run()
6060
@Test def betterfiles = projects.betterfiles.run()
6161
@Test def cask = projects.cask.run()
6262
// Temporarily disabled until problem discovered in comments to #9449 is fixed
@@ -90,7 +90,6 @@ class CommunityBuildTestC:
9090
@Test def scas = projects.scas.run()
9191
@Test def sconfig = projects.sconfig.run()
9292
@Test def shapeless = projects.shapeless.run()
93-
@Test def spire = projects.spire.run()
9493
@Test def sourcecode = projects.sourcecode.run()
9594
@Test def specs2 = projects.specs2.run()
9695
@Test def stdLib213 = projects.stdLib213.run()

project/Build.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ object Build {
15681568
).evaluated
15691569
)
15701570

1571-
val prepareCommunityBuild = taskKey[Unit]("Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{scala3-bootstrapped.version,sbt-dotty-sbt}.")
1571+
val prepareCommunityBuild = taskKey[Unit]("Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{scala3-bootstrapped.version,sbt-injected-plugins}.")
15721572

15731573
lazy val `community-build` = project.in(file("community-build")).
15741574
dependsOn(dottyLibrary(Bootstrapped)).
@@ -1588,10 +1588,9 @@ object Build {
15881588
// (publishLocal in `scala3-staging`).value
15891589
val pluginText =
15901590
s"""updateOptions in Global ~= (_.withLatestSnapshots(false))
1591-
|addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "$sbtDottyVersion")
15921591
|addSbtPlugin("ch.epfl.lamp" % "sbt-community-build" % "$sbtCommunityBuildVersion")
15931592
|addSbtPlugin("org.scala-js" % "sbt-scalajs" % "$scalaJSVersion")""".stripMargin
1594-
IO.write(baseDirectory.value / "sbt-dotty-sbt", pluginText)
1593+
IO.write(baseDirectory.value / "sbt-injected-plugins", pluginText)
15951594
IO.write(baseDirectory.value / "scala3-bootstrapped.version", dottyVersion)
15961595
IO.delete(baseDirectory.value / "dotty-community-build-deps") // delete any stale deps file
15971596
},

0 commit comments

Comments
 (0)