Skip to content

Commit 6714547

Browse files
committed
Add changes needed to run docs on many project
1 parent 955e16e commit 6714547

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

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

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ final case class SbtCommunityProject(
104104
override val publishCommand = if sbtPublishCommand eq null then null else s"$baseCommand$sbtPublishCommand"
105105
override val docCommand =
106106
if sbtDocCommand eq null then null else
107-
s"$baseCommand;set every useScala3doc := true $sbtDocCommand"
107+
val cmd = if sbtDocCommand.startsWith(";") then sbtDocCommand else s";$sbtDocCommand"
108+
s"$baseCommand set every useScala3doc := true $cmd "
108109

109110
override val runCommandsArgs: List[String] =
110111
// Run the sbt command with the compiler version and sbt plugin set in the build
@@ -194,40 +195,51 @@ object projects:
194195
lazy val intent = SbtCommunityProject(
195196
project = "intent",
196197
sbtTestCommand = "test",
198+
sbtDocCommand = "doc"
197199
)
198200

199201
lazy val algebra = SbtCommunityProject(
200202
project = "algebra",
201203
sbtTestCommand = "coreJVM/compile",
204+
sbtDocCommand = "coreJVM/doc"
202205
)
203206

204207
lazy val scalacheck = SbtCommunityProject(
205208
project = "scalacheck",
206209
sbtTestCommand = "jvm/test;js/test",
207-
sbtPublishCommand = "jvm/publishLocal;js/publishLocal"
210+
sbtPublishCommand = "jvm/publishLocal;js/publishLocal",
211+
sbtDocCommand = "jvm/doc"
208212
)
209213

210214
lazy val scalatest = SbtCommunityProject(
211215
project = "scalatest",
212216
sbtTestCommand = "scalacticDotty/clean;scalacticTestDotty/test; scalatestTestDotty/test",
213-
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal"
217+
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal",
218+
sbtDocCommand = ";scalacticDotty/clean ;scalacticDotty/doc; scalatestDotty/doc"
219+
// cannot take signature of (test: org.scalatest.concurrent.ConductorFixture#OneArgTest):
220+
// org.scalatest.Outcome
221+
// Problem parsing scalatest.dotty/target/scala-3.0.0-M2/src_managed/main/org/scalatest/concurrent/ConductorFixture.scala:[602..624..3843], documentation may not be generated.
222+
// dotty.tools.dotc.core.MissingType:
214223
)
215224

216225
lazy val scalatestplusScalacheck = SbtCommunityProject(
217226
project = "scalatestplus-scalacheck",
218227
sbtTestCommand = "scalatestPlusScalaCheckJVM/test",
219228
sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
229+
sbtDocCommand = "scalatestPlusScalaCheckJVM/doc",
220230
dependencies = List(scalatest, scalacheck)
221231
)
222232

223233
lazy val scalaXml = SbtCommunityProject(
224234
project = "scala-xml",
225235
sbtTestCommand = "xml/test",
236+
sbtDocCommand = "xml/doc"
226237
)
227238

228239
lazy val scalap = SbtCommunityProject(
229240
project = "scalap",
230241
sbtTestCommand = "scalap/compile",
242+
sbtDocCommand = "scalap/doc"
231243
)
232244

233245
lazy val betterfiles = SbtCommunityProject(
@@ -239,34 +251,42 @@ object projects:
239251
lazy val ScalaPB = SbtCommunityProject(
240252
project = "ScalaPB",
241253
sbtTestCommand = "dotty-community-build/compile",
254+
sbtDocCommand = "dotty-community-build/doc"
242255
)
243256

244257
lazy val minitest = SbtCommunityProject(
245258
project = "minitest",
246259
sbtTestCommand = "test",
260+
sbtDocCommand = "dotty-community-build/doc",
247261
dependencies = List(scalacheck)
248262
)
249263

250264
lazy val fastparse = SbtCommunityProject(
251265
project = "fastparse",
252266
sbtTestCommand = "dotty-community-build/compile;dotty-community-build/test:compile",
267+
// Problem parsing perftests/bench2/src/perftests/PythonParse.scala:[0..18..694]
268+
// sbtDocCommand = "dotty-community-build/doc"
253269
)
254270

255271
lazy val stdLib213 = SbtCommunityProject(
256272
project = "stdLib213",
257273
extraSbtArgs = List("-Dscala.build.compileWithDotty=true"),
258274
sbtTestCommand = """library/compile""",
259275
sbtPublishCommand = """set publishArtifact in (library, Compile, packageDoc) := false ;library/publishLocal""",
276+
// sbtDocCommand = "library/doc" // Does no compile? No idea :/
260277
)
261278

279+
262280
lazy val shapeless = SbtCommunityProject(
263281
project = "shapeless",
264282
sbtTestCommand = "test",
283+
sbtDocCommand = "doc"
265284
)
266285

267286
lazy val xmlInterpolator = SbtCommunityProject(
268287
project = "xml-interpolator",
269288
sbtTestCommand = "test",
289+
sbtDocCommand = "doc", // Again we've got problem with extensions
270290
)
271291

272292
lazy val effpi = SbtCommunityProject(
@@ -282,6 +302,7 @@ object projects:
282302
// sbtTestCommand = "set ThisBuild / useEffpiPlugin := false; effpi/test:compile; plugin/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
283303

284304
sbtTestCommand = "set ThisBuild / useEffpiPlugin := false; effpi/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
305+
sbtDocCommand = "set ThisBuild / useEffpiPlugin := false; effpi/doc; benchmarks/doc; examples/doc; pluginBenchmarks/doc",
285306
)
286307

287308
// TODO @odersky? It got broken by #5458
@@ -293,75 +314,89 @@ object projects:
293314
lazy val sconfig = SbtCommunityProject(
294315
project = "sconfig",
295316
sbtTestCommand = "sconfigJVM/test",
317+
sbtDocCommand = "sconfigJVM/doc",
296318
)
297319

298320
lazy val zio = SbtCommunityProject(
299321
project = "zio",
300322
sbtTestCommand = "testJVMDotty",
323+
// sbtDocCommand = "coreJVM/doc",
324+
// Fails on tasty unpickling https://github.com/lampepfl/dotty/issues/10499
301325
)
302326

303327
lazy val munit = SbtCommunityProject(
304328
project = "munit",
305329
sbtTestCommand = "testsJVM/test",
330+
sbtDocCommand = "munitJVM/doc",
306331
)
307332

308333
lazy val scodecBits = SbtCommunityProject(
309334
project = "scodec-bits",
310335
sbtTestCommand = "coreJVM/test",
311336
sbtPublishCommand = "coreJVM/publishLocal",
337+
sbtDocCommand = "coreJVM/doc",
312338
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck)
313339
)
314340

315341
lazy val scodec = SbtCommunityProject(
316342
project = "scodec",
317343
sbtTestCommand = "unitTests/test",
344+
// Adds <empty> package
345+
sbtDocCommand = "coreJVM/doc",
318346
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, scodecBits)
319347
)
320348

321349
lazy val scalaParserCombinators = SbtCommunityProject(
322350
project = "scala-parser-combinators",
323351
sbtTestCommand = "parserCombinatorsJVM/test",
352+
sbtDocCommand = "parserCombinatorsJVM/doc",
324353
)
325354

326355
lazy val dottyCpsAsync = SbtCommunityProject(
327356
project = "dotty-cps-async",
328357
sbtTestCommand = "test",
358+
sbtDocCommand = "doc",
329359
)
330360

331361
lazy val scalaz = SbtCommunityProject(
332362
project = "scalaz",
333363
sbtTestCommand = "rootJVM/test",
334-
// has doc/sources set to Nil
364+
sbtDocCommand = "rootJVM/doc",
335365
dependencies = List(scalacheck)
336366
)
337367

338368
lazy val endpoints4s = SbtCommunityProject(
339369
project = "endpoints4s",
340-
sbtTestCommand = "json-schemaJVM/compile;algebraJVM/compile;openapiJVM/compile;http4s-server/compile;http4s-client/compile;play-server/compile;play-client/compile;akka-http-server/compile;akka-http-client/compile"
370+
sbtTestCommand = "json-schemaJVM/compile;algebraJVM/compile;openapiJVM/compile;http4s-server/compile;http4s-client/compile;play-server/compile;play-client/compile;akka-http-server/compile;akka-http-client/compile",
371+
sbtDocCommand = ";json-schemaJVM/doc ;algebraJVM/doc; openapiJVM/doc; http4s-server/doc ;http4s-client/doc ;play-server/doc ;play-client/doc ;akka-http-server/doc ;akka-http-client/doc",
341372
)
342373

343374
lazy val catsEffect2 = SbtCommunityProject(
344375
project = "cats-effect-2",
345376
sbtTestCommand = "test",
377+
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc",
346378
forceUpgradeSbtScalajsPlugin = true
347379
)
348380

349381
lazy val catsEffect3 = SbtCommunityProject(
350382
project = "cats-effect-3",
351-
sbtTestCommand = "testIfRelevant"
383+
sbtTestCommand = "testIfRelevant",
384+
// The problem is that testIfRelevant does not compile and project does not compile
385+
// sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
352386
)
353387

354388
lazy val scalaParallelCollections = SbtCommunityProject(
355389
project = "scala-parallel-collections",
356390
sbtTestCommand = "test",
391+
sbtDocCommand = "doc",
357392
dependencies = List(scalacheck)
358393
)
359394

360395
lazy val scalaCollectionCompat = SbtCommunityProject(
361396
project = "scala-collection-compat",
362397
sbtTestCommand = "compat30/test",
363398
)
364-
399+
365400
val projectMap = Map(
366401
"utest" -> utest,
367402
"sourcecode" -> sourcecode,
@@ -381,9 +416,7 @@ object projects:
381416
"scalatest" -> scalatest,
382417
"scalatestplusScalacheck" -> scalatestplusScalacheck,
383418
"scalaXml" -> scalaXml,
384-
"scopt" -> scopt,
385419
"scalap" -> scalap,
386-
"squants" -> squants,
387420
"betterfiles" -> betterfiles,
388421
"ScalaPB" -> ScalaPB,
389422
"minitest" -> minitest,
@@ -403,7 +436,8 @@ object projects:
403436
"endpoints4s" -> endpoints4s,
404437
"catsEffect2" -> catsEffect2,
405438
"catsEffect3" -> catsEffect3,
406-
"scalaCollectionCompat" -> scalaCollectionCompat
439+
"scalaCollectionCompat" -> scalaCollectionCompat,
440+
"scalaParallelCollections" -> scalaParallelCollections,
407441
)
408442
def apply(key: String) = projectMap(key)
409443

0 commit comments

Comments
 (0)