Skip to content

Commit 5ed5e14

Browse files
Merge pull request #7632 from dotty-staging/ujson-community
Add ujson and the scalatest-scalacheck bridge to the community build
2 parents f1c701e + 6e90fe4 commit 5ed5e14

File tree

4 files changed

+51
-25
lines changed

4 files changed

+51
-25
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@
6262
[submodule "community-build/community-projects/os-lib"]
6363
path = community-build/community-projects/os-lib
6464
url = https://github.com/dotty-staging/os-lib.git
65+
[submodule "community-build/community-projects/scalatestplus-scalacheck"]
66+
path = community-build/community-projects/scalatestplus-scalacheck
67+
url = https://github.com/dotty-staging/scalatestplus-scalacheck.git
68+
[submodule "community-build/community-projects/upickle"]
69+
path = community-build/community-projects/upickle
70+
url = https://github.com/dotty-staging/upickle.git
Submodule upickle added at e46ab93

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

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ final case class MillCommunityProject(project: String, baseCommand: String,
8787

8888
final case class SbtCommunityProject(project: String, sbtTestCommand: String,
8989
sbtUpdateCommand: String, extraSbtArgs: List[String] = Nil,
90-
dependencies: List[CommunityProject] = Nil) extends CommunityProject
90+
dependencies: List[CommunityProject] = Nil, sbtPublishCommand: String = null) extends CommunityProject
9191
override val binaryName: String = "sbt"
9292
private val baseCommand = s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! "
93-
override val publishCommand = null
9493
override val testCommand = s"$baseCommand$sbtTestCommand"
9594
override val updateCommand = s"$baseCommand$sbtUpdateCommand"
95+
override val publishCommand = s"$baseCommand$sbtPublishCommand"
9696

9797
override val runCommandsArgs: List[String] =
9898
// Run the sbt command with the compiler version and sbt plugin set in the build
@@ -104,126 +104,142 @@ final case class SbtCommunityProject(project: String, sbtTestCommand: String,
104104
s"--addPluginSbtFile=$sbtPluginFilePath")
105105

106106
object projects
107-
val utest = MillCommunityProject(
107+
lazy val utest = MillCommunityProject(
108108
project = "utest",
109109
baseCommand = s"utest.jvm[$compilerVersion]",
110110
)
111111

112-
val sourcecode = MillCommunityProject(
112+
lazy val sourcecode = MillCommunityProject(
113113
project = "sourcecode",
114114
baseCommand = s"sourcecode.jvm[$compilerVersion]",
115115
)
116116

117-
val oslib = MillCommunityProject(
117+
lazy val oslib = MillCommunityProject(
118118
project = "os-lib",
119119
baseCommand = s"os[$compilerVersion]",
120120
dependencies = List(utest, sourcecode)
121121
)
122122

123-
val oslibWatch = MillCommunityProject(
123+
lazy val oslibWatch = MillCommunityProject(
124124
project = "os-lib",
125125
baseCommand = s"os.watch[$compilerVersion]",
126126
dependencies = List(utest, sourcecode)
127127
)
128128

129-
val intent = SbtCommunityProject(
129+
lazy val ujson = MillCommunityProject(
130+
project = "upickle",
131+
baseCommand = s"ujson.jvm[$compilerVersion]",
132+
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck)
133+
)
134+
135+
lazy val intent = SbtCommunityProject(
130136
project = "intent",
131137
sbtTestCommand = "test",
132138
sbtUpdateCommand = "update"
133139
)
134140

135-
val algebra = SbtCommunityProject(
141+
lazy val algebra = SbtCommunityProject(
136142
project = "algebra",
137143
sbtTestCommand = "coreJVM/compile",
138144
sbtUpdateCommand = "coreJVM/update"
139145
)
140146

141-
val scalacheck = SbtCommunityProject(
147+
lazy val scalacheck = SbtCommunityProject(
142148
project = "scalacheck",
143149
sbtTestCommand = "jvm/test",
144-
sbtUpdateCommand = "jvm/test:update"
150+
sbtUpdateCommand = "jvm/test:update",
151+
sbtPublishCommand = ";set jvm/publishArtifact in (Compile, packageDoc) := false ;jvm/publishLocal"
145152
)
146153

147-
val scalatest = SbtCommunityProject(
154+
lazy val scalatest = SbtCommunityProject(
148155
project = "scalatest",
149156
sbtTestCommand = ";scalacticDotty/clean;scalacticTestDotty/test;scalatestTestDotty/test",
150-
sbtUpdateCommand = "scalatest/update"
157+
sbtUpdateCommand = "scalatest/update",
158+
sbtPublishCommand = ";scalacticDotty/publishLocal; scalatestDotty/publishLocal"
159+
)
160+
161+
lazy val scalatestplusScalacheck = SbtCommunityProject(
162+
project = "scalatestplus-scalacheck",
163+
sbtTestCommand = "scalatestPlusScalaCheckJVM/compile", // TODO: compile only because tests are prone to java.lang.OutOfMemoryError: Metaspace
164+
sbtUpdateCommand = "scalatestPlusScalaCheckJVM/update",
165+
sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
166+
dependencies = List(scalatest, scalacheck)
151167
)
152168

153-
val scalaXml = SbtCommunityProject(
169+
lazy val scalaXml = SbtCommunityProject(
154170
project = "scala-xml",
155171
sbtTestCommand = "xml/test",
156172
sbtUpdateCommand = "xml/update"
157173
)
158174

159-
val scopt = SbtCommunityProject(
175+
lazy val scopt = SbtCommunityProject(
160176
project = "scopt",
161177
sbtTestCommand = "scoptJVM/compile",
162178
sbtUpdateCommand = "scoptJVM/update"
163179
)
164180

165-
val scalap = SbtCommunityProject(
181+
lazy val scalap = SbtCommunityProject(
166182
project = "scalap",
167183
sbtTestCommand = "scalap/compile",
168184
sbtUpdateCommand = "scalap/update"
169185
)
170186

171-
val squants = SbtCommunityProject(
187+
lazy val squants = SbtCommunityProject(
172188
project = "squants",
173189
sbtTestCommand = "squantsJVM/compile",
174190
sbtUpdateCommand = "squantsJVM/update"
175191
)
176192

177-
val betterfiles = SbtCommunityProject(
193+
lazy val betterfiles = SbtCommunityProject(
178194
project = "betterfiles",
179195
sbtTestCommand = "dotty-community-build/compile",
180196
sbtUpdateCommand = "dotty-community-build/update"
181197
)
182198

183-
val ScalaPB = SbtCommunityProject(
199+
lazy val ScalaPB = SbtCommunityProject(
184200
project = "ScalaPB",
185201
sbtTestCommand = "dotty-community-build/compile",
186202
sbtUpdateCommand = "dotty-community-build/update"
187203
)
188204

189-
val minitest = SbtCommunityProject(
205+
lazy val minitest = SbtCommunityProject(
190206
project = "minitest",
191207
sbtTestCommand = "dotty-community-build/compile",
192208
sbtUpdateCommand = "dotty-community-build/update"
193209
)
194210

195-
val fastparse = SbtCommunityProject(
211+
lazy val fastparse = SbtCommunityProject(
196212
project = "fastparse",
197213
sbtTestCommand = "dotty-community-build/compile;dotty-community-build/test:compile",
198214
sbtUpdateCommand = "dotty-community-build/update"
199215
)
200216

201-
val stdLib213 = SbtCommunityProject(
217+
lazy val stdLib213 = SbtCommunityProject(
202218
project = "stdLib213",
203219
sbtTestCommand = "library/compile",
204220
sbtUpdateCommand = "library/update",
205221
extraSbtArgs = List("-Dscala.build.compileWithDotty=true")
206222
)
207223

208-
val shapeless = SbtCommunityProject(
224+
lazy val shapeless = SbtCommunityProject(
209225
project = "shapeless",
210226
sbtTestCommand = "test",
211227
sbtUpdateCommand = "update"
212228
)
213229

214-
val xmlInterpolator = SbtCommunityProject(
230+
lazy val xmlInterpolator = SbtCommunityProject(
215231
project = "xml-interpolator",
216232
sbtTestCommand = "test",
217233
sbtUpdateCommand = "update"
218234
)
219235

220-
val semanticdb = SbtCommunityProject(
236+
lazy val semanticdb = SbtCommunityProject(
221237
project = "semanticdb",
222238
sbtTestCommand = "test:compile",
223239
sbtUpdateCommand = "update"
224240
)
225241

226-
val effpi = SbtCommunityProject(
242+
lazy val effpi = SbtCommunityProject(
227243
project = "effpi",
228244
// We set `useEffpiPlugin := false` because we don't want to run their
229245
// compiler plugin since it relies on external binaries (from the model
@@ -300,6 +316,7 @@ class CommunityBuildTest {
300316
@Test def algebra = projects.algebra.run()
301317
@Test def scalacheck = projects.scalacheck.run()
302318
@Test def scalatest = projects.scalatest.run()
319+
@Test def scalatestplusScalacheck = projects.scalatestplusScalacheck.run()
303320
@Test def scalaXml = projects.scalaXml.run()
304321
@Test def scopt = projects.scopt.run()
305322
@Test def scalap = projects.scalap.run()
@@ -311,6 +328,7 @@ class CommunityBuildTest {
311328
@Test def utest = projects.utest.run()
312329
@Test def sourcecode = projects.sourcecode.run()
313330
@Test def oslib = projects.oslib.run()
331+
@Test def ujson = projects.ujson.run()
314332
// @Test def oslibWatch = projects.oslibWatch.run()
315333
@Test def stdLib213 = projects.stdLib213.run()
316334
@Test def shapeless = projects.shapeless.run()

0 commit comments

Comments
 (0)