Skip to content

Commit 445146f

Browse files
community-build: Update many projects
- We start by updating scalatest (thanks Nicolas), with an extra commit to increase the heapsize otherwise it wouldn't run on the CI. - scalatestplus-scalacheck had to upgraded too. - upickle/ujson do not depend on scalatest when building with dotty currently so we can drop the dependency in projects.scala. - updated scodec/scodec-bits to latest upstream which doesn't depend on scalatest anymore, but does depend on munit, which I also upgraded, a few tweaks to these projects were required. - the upgraded munit required a patch because MacroCompat was in scala-3.0.0-M2 but we need it to work with our snapshots releases, so I copy-pasted it to scala-3. - Also updated scala-parallel-collections to latest upstream since we don't need any special handling anymore. Co-Authored-By: Nicolas Stucki <[email protected]>
1 parent 31751b9 commit 445146f

File tree

8 files changed

+39
-19
lines changed

8 files changed

+39
-19
lines changed
Submodule munit updated 162 files
Submodule scalatest updated 1600 files
Submodule scodec updated 125 files
Submodule scodec-bits updated 58 files

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

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ def exec(projectDir: Path, binary: String, arguments: String*): Int =
3030
exitCode
3131

3232

33+
/** Versions of published projects, needs to be updated when a project in the build is updated. */
34+
object Versions:
35+
val scalacheck = "1.15.2-SNAPSHOT"
36+
val scalatest = "3.2.3"
37+
val munit = "0.7.19+7-3ce72dda-SNAPSHOT"
38+
val scodecBits = "1.1-17-c6dbf21"
39+
3340
sealed trait CommunityProject:
3441
private var published = false
3542

@@ -73,10 +80,22 @@ final case class SbtCommunityProject(
7380
sbtPublishCommand: String = null) extends CommunityProject:
7481
override val binaryName: String = "sbt"
7582

83+
// A project in the community build can depend on an arbitrary version of
84+
// another project in the build, so we force the use of the version that is
85+
// actually in the community build.
7686
val dependencyOverrides = List(
7787
// dependencyOverrides doesn't seem to understand `%%%`
78-
""""org.scalacheck" %% "scalacheck" % "1.15.2-SNAPSHOT"""",
79-
""""org.scalacheck" %% "scalacheck_sjs1" % "1.15.2-SNAPSHOT""""
88+
s""""org.scalacheck" %% "scalacheck" % "${Versions.scalacheck}"""",
89+
s""""org.scalacheck" %% "scalacheck_sjs1" % "${Versions.scalacheck}"""",
90+
s""""org.scalatest" %% "scalatest" % "${Versions.scalatest}"""",
91+
s""""org.scalatest" %% "scalatest_sjs1" % "${Versions.scalatest}"""",
92+
s""""org.scalameta" %% "munit" % "${Versions.munit}"""",
93+
s""""org.scalameta" %% "munit_sjs1" % "${Versions.munit}"""",
94+
s""""org.scalameta" %% "munit-scalacheck" % "${Versions.munit}"""",
95+
s""""org.scalameta" %% "munit-scalacheck_sjs1" % "${Versions.munit}"""",
96+
s""""org.scalameta" %% "junit-interface" % "${Versions.munit}"""",
97+
s""""org.scodec" %% "scodec-bits" % "${Versions.scodecBits}"""",
98+
s""""org.scodec" %% "scodec-bits_sjs1" % "${Versions.scodecBits}"""",
8099
)
81100

82101
private val baseCommand =
@@ -127,19 +146,19 @@ object projects:
127146
lazy val ujson = MillCommunityProject(
128147
project = "upickle",
129148
baseCommand = s"ujson.jvm[$compilerVersion]",
130-
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, geny)
149+
dependencies = List(geny)
131150
)
132151

133152
lazy val upickle = MillCommunityProject(
134153
project = "upickle",
135154
baseCommand = s"upickle.jvm[$compilerVersion]",
136-
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, geny, utest)
155+
dependencies = List(geny, utest)
137156
)
138157

139158
lazy val upickleCore = MillCommunityProject(
140159
project = "upickle",
141160
baseCommand = s"core.jvm[$compilerVersion]",
142-
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, geny, utest)
161+
dependencies = List(geny, utest)
143162
)
144163

145164
lazy val geny = MillCommunityProject(
@@ -280,21 +299,22 @@ object projects:
280299
)
281300

282301
lazy val munit = SbtCommunityProject(
283-
project = "munit",
284-
sbtTestCommand = "testsJVM/test",
302+
project = "munit",
303+
sbtTestCommand = "testsJVM/test;testsJS/test;",
304+
sbtPublishCommand = "munitJVM/publishLocal;munitJS/publishLocal;munitScalacheckJVM/publishLocal;munitScalacheckJS/publishLocal;junit/publishLocal",
285305
)
286306

287307
lazy val scodecBits = SbtCommunityProject(
288308
project = "scodec-bits",
289-
sbtTestCommand = "coreJVM/test",
290-
sbtPublishCommand = "coreJVM/publishLocal",
291-
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck)
309+
sbtTestCommand = "coreJVM/test;coreJS/test",
310+
sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal",
311+
dependencies = List(munit)
292312
)
293313

294314
lazy val scodec = SbtCommunityProject(
295315
project = "scodec",
296316
sbtTestCommand = "unitTests/test",
297-
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, scodecBits)
317+
dependencies = List(munit, scodecBits)
298318
)
299319

300320
lazy val scalaParserCombinators = SbtCommunityProject(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ class CommunityBuildTestA extends CommunityBuildTest:
9393
@Test def scalatest = projects.scalatest.run()
9494
@Test def scalatestplusScalacheck = projects.scalatestplusScalacheck.run()
9595
@Test def sourcecode = projects.sourcecode.run()
96-
@Test def scodec = projects.scodec.run()
97-
@Test def scodecBits = projects.scodecBits.run()
9896
@Test def ujson = projects.ujson.run()
9997
@Test def upickle = projects.upickle.run()
10098
@Test def utest = projects.utest.run()
@@ -114,6 +112,8 @@ class CommunityBuildTestB extends CommunityBuildTest:
114112
@Test def intent = projects.intent.run()
115113
@Test def minitest = projects.minitest.run()
116114
@Test def munit = projects.munit.run()
115+
@Test def scodec = projects.scodec.run()
116+
@Test def scodecBits = projects.scodecBits.run()
117117
@Test def scalap = projects.scalap.run()
118118
@Test def scalaCollectionCompat = projects.scalaCollectionCompat.run()
119119
@Test def scalaParallelCollections = projects.scalaParallelCollections.run()

0 commit comments

Comments
 (0)