Skip to content

Commit 58171fb

Browse files
Merge pull request #14395 from griggt/wip/cb-drop-sbt-dotty
Drop all usage of `sbt-dotty` in community build
2 parents dd896f1 + ba71f7c commit 58171fb

Some content is hidden

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

70 files changed

+95
-90
lines changed

.github/workflows/ci.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ jobs:
232232
git submodule update --init --recursive --jobs 7
233233
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
234234
235+
- name: Show dependency tracking file
236+
if: ${{ always() }}
237+
run: cat community-build/dotty-community-build-deps || true
238+
235239
community_build_b:
236240
runs-on: [self-hosted, Linux]
237241
container:
@@ -275,6 +279,10 @@ jobs:
275279
git submodule update --init --recursive --jobs 7
276280
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
277281
282+
- name: Show dependency tracking file
283+
if: ${{ always() }}
284+
run: cat community-build/dotty-community-build-deps || true
285+
278286
community_build_c:
279287
runs-on: [self-hosted, Linux]
280288
container:
@@ -318,6 +326,10 @@ jobs:
318326
git submodule update --init --recursive --jobs 7
319327
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
320328
329+
- name: Show dependency tracking file
330+
if: ${{ always() }}
331+
run: cat community-build/dotty-community-build-deps || true
332+
321333
community_build_forward_compat:
322334
runs-on: [self-hosted, Linux]
323335
container:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ compiler/after-pickling.txt
6565
bench/compile.txt
6666

6767
community-build/scala3-bootstrapped.version
68+
community-build/sbt-injected-plugins
6869
community-build/sbt-dotty-sbt
6970
community-build/sbt-scalajs-sbt
7071
community-build/dotty-community-build-deps

.gitmodules

-3
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
This file was deleted.
Submodule cats updated 298 files
Submodule fs2 updated 307 files
Submodule play-json updated 78 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

+1-1
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

+15-17
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

@@ -145,7 +145,7 @@ final case class SbtCommunityProject(
145145
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
146146
case _ => Nil
147147
extraSbtArgs ++ sbtProps ++ List(
148-
"-sbt-version", "1.6.1",
148+
"-sbt-version", "1.6.2",
149149
"-Dsbt.supershell=false",
150150
s"-Ddotty.communitybuild.dir=$communitybuildDir",
151151
s"--addPluginSbtFile=$sbtPluginFilePath"
@@ -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",
@@ -305,10 +299,9 @@ object projects:
305299
// Some scalatest's tests are flaky (https://github.com/scalatest/scalatest/issues/2049)
306300
// so we disable them, this list is based on the one used in the Scala 2 community build
307301
// (https://github.com/scala/community-build/blob/2.13.x/proj/scalatest.conf).
308-
"""set scalatestTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "GeneratorSpec.scala" || "FrameworkSuite.scala" || "WaitersSpec.scala" || "TestSortingReporterSpec.scala" || "JavaFuturesSpec.scala" || "ParallelTestExecutionSpec.scala" || "TimeLimitsSpec.scala" || "TestThreadsStartingCounterSpec.scala" || "SuiteSortingReporterSpec.scala" || "CommonGeneratorsSpec.scala" || "PropCheckerAssertingSpec.scala" || "ConductorMethodsSuite.scala"""",
309-
"""set scalacticTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "NonEmptyArraySpec.scala"""",
302+
"""set scalatestTestDotty / Test / managedSources ~= (_.filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "WaitersSpec.scala").filterNot(_.getName == "TestSortingReporterSpec.scala").filterNot(_.getName == "JavaFuturesSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "TimeLimitsSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "SuiteSortingReporterSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "PropCheckerAssertingSpec.scala").filterNot(_.getName == "ConductorMethodsSuite.scala").filterNot(_.getName == "EventuallySpec.scala"))""",
303+
"""set scalacticTestDotty / Test / managedSources ~= (_.filterNot(_.getName == "NonEmptyArraySpec.scala"))""",
310304
"""set genRegularTests4 / Test / managedSources ~= (_.filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "EventuallySpec.scala"))""",
311-
312305
"scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile"
313306
).mkString("; "),
314307
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal; scalacticDottyJS/publishLocal; scalatestDottyJS/publishLocal",
@@ -364,7 +357,7 @@ object projects:
364357

365358
lazy val scalaPB = SbtCommunityProject(
366359
project = "ScalaPB",
367-
sbtTestCommand = "dotty-community-build/compile",
360+
sbtTestCommand = "lensesJVM3/compile; runtimeJVM3/compile; grpcRuntimeJVM3/compile; compilerPluginJVM3/compile",
368361
// aggregateDoc("runtimeJVM")("scalapbc", "grpcRuntime", "compilerPlugin") fails with
369362
// module class ScalaPbCodeGenerator$ has non-class parent: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module protocbridge),ProtocCodeGenerator)
370363
// Also it seems that we do not handle correctly aggreagation projects
@@ -442,6 +435,7 @@ object projects:
442435
project = "zio",
443436
sbtTestCommand = "testJVMDotty",
444437
sbtDocCommand = forceDoc("coreJVM"),
438+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
445439
dependencies = () => List(izumiReflect)
446440
)
447441

@@ -468,12 +462,13 @@ object projects:
468462
sbtTestCommand = "unitTests/test",
469463
// Adds <empty> package
470464
sbtDocCommand = "coreJVM/doc",
465+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
471466
dependencies = () => List(munit, scodecBits),
472467
)
473468

474469
lazy val scalaParserCombinators = SbtCommunityProject(
475470
project = "scala-parser-combinators",
476-
sbtTestCommand = "parserCombinatorsJVM/test",
471+
sbtTestCommand = "set every versionPolicyIntention := Compatibility.None; parserCombinatorsJVM/test",
477472
sbtDocCommand = forceDoc("parserCombinatorsJVM"),
478473
)
479474

@@ -512,7 +507,7 @@ object projects:
512507

513508
lazy val catsEffect3 = SbtCommunityProject(
514509
project = "cats-effect-3",
515-
sbtTestCommand = "test",
510+
sbtTestCommand = "ciJVM",
516511
sbtPublishCommand = "publishLocal",
517512
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
518513
dependencies = () => List(cats, coop, disciplineSpecs2, scalacheck)
@@ -552,6 +547,7 @@ object projects:
552547
project = "discipline",
553548
sbtTestCommand = "coreJVM/test;coreJS/test",
554549
sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal",
550+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
555551
dependencies = () => List(scalacheck)
556552
)
557553

@@ -679,9 +675,9 @@ object projects:
679675

680676
lazy val scissLucre = SbtCommunityProject(
681677
project = "Lucre",
682-
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",
683679
extraSbtArgs = List("-Dde.sciss.lucre.ShortTests=true"),
684-
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",
685681
dependencies = () => List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest),
686682
)
687683

@@ -711,6 +707,7 @@ object projects:
711707
"""set actorTests/Compile/scalacOptions -= "-Xfatal-warnings"""",
712708
"akka-actor-tests/Test/compile",
713709
).mkString("; "),
710+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
714711
dependencies = () => List(scalatest, scalatestplusJunit, scalatestplusScalacheck)
715712
)
716713

@@ -761,6 +758,7 @@ object projects:
761758
project = "fs2",
762759
sbtTestCommand = "coreJVM/test; coreJS/test", // io/test requires JDK9+
763760
sbtPublishCommand = "coreJVM/publishLocal; coreJS/publishLocal",
761+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
764762
dependencies = () => List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits)
765763
)
766764

@@ -789,6 +787,7 @@ object projects:
789787
project = "spire",
790788
sbtTestCommand = "test",
791789
sbtPublishCommand = "publishLocal",
790+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
792791
dependencies = () => List(cats, disciplineMunit)
793792
)
794793

@@ -824,7 +823,6 @@ def allProjects = List(
824823
projects.cask,
825824
projects.scas,
826825
projects.intent,
827-
projects.algebra,
828826
projects.scalacheck,
829827
projects.scalacheckForwardCompat,
830828
projects.scalatest,

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

+2-3
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()

0 commit comments

Comments
 (0)