Skip to content

Commit d8367ea

Browse files
committed
Add changes needed to run docs on many project
1 parent d32b17f commit d8367ea

File tree

1 file changed

+46
-15
lines changed

1 file changed

+46
-15
lines changed

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

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ final case class SbtCommunityProject(
125125
override val publishCommand = if sbtPublishCommand eq null then null else s"$baseCommand$sbtPublishCommand"
126126
override val docCommand =
127127
if sbtDocCommand eq null then null else
128-
s"$baseCommand;set every useScala3doc := true $sbtDocCommand"
128+
val cmd = if sbtDocCommand.startsWith(";") then sbtDocCommand else s";$sbtDocCommand"
129+
s"$baseCommand set every useScala3doc := true $cmd "
129130

130131
override val runCommandsArgs: List[String] =
131132
// Run the sbt command with the compiler version and sbt plugin set in the build
@@ -212,40 +213,51 @@ object projects:
212213
lazy val intent = SbtCommunityProject(
213214
project = "intent",
214215
sbtTestCommand = "test",
216+
sbtDocCommand = "doc"
215217
)
216218

217219
lazy val algebra = SbtCommunityProject(
218220
project = "algebra",
219221
sbtTestCommand = "coreJVM/compile",
222+
sbtDocCommand = "coreJVM/doc"
220223
)
221224

222225
lazy val scalacheck = SbtCommunityProject(
223226
project = "scalacheck",
224227
sbtTestCommand = "jvm/test;js/test",
225-
sbtPublishCommand = "jvm/publishLocal;js/publishLocal"
228+
sbtPublishCommand = "jvm/publishLocal;js/publishLocal",
229+
sbtDocCommand = "jvm/doc"
226230
)
227231

228232
lazy val scalatest = SbtCommunityProject(
229233
project = "scalatest",
230234
sbtTestCommand = "scalacticDotty/clean;scalacticTestDotty/test; scalatestTestDotty/test",
231-
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal"
235+
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal",
236+
sbtDocCommand = ";scalacticDotty/clean ;scalacticDotty/doc; scalatestDotty/doc"
237+
// cannot take signature of (test: org.scalatest.concurrent.ConductorFixture#OneArgTest):
238+
// org.scalatest.Outcome
239+
// 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.
240+
// dotty.tools.dotc.core.MissingType:
232241
)
233242

234243
lazy val scalatestplusScalacheck = SbtCommunityProject(
235244
project = "scalatestplus-scalacheck",
236245
sbtTestCommand = "scalatestPlusScalaCheckJVM/test",
237246
sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
247+
sbtDocCommand = "scalatestPlusScalaCheckJVM/doc",
238248
dependencies = List(scalatest, scalacheck)
239249
)
240250

241251
lazy val scalaXml = SbtCommunityProject(
242252
project = "scala-xml",
243253
sbtTestCommand = "xml/test",
254+
sbtDocCommand = "xml/doc"
244255
)
245256

246257
lazy val scalap = SbtCommunityProject(
247258
project = "scalap",
248259
sbtTestCommand = "scalap/compile",
260+
sbtDocCommand = "scalap/doc"
249261
)
250262

251263
lazy val betterfiles = SbtCommunityProject(
@@ -257,34 +269,42 @@ object projects:
257269
lazy val ScalaPB = SbtCommunityProject(
258270
project = "ScalaPB",
259271
sbtTestCommand = "dotty-community-build/compile",
272+
sbtDocCommand = "dotty-community-build/doc"
260273
)
261274

262275
lazy val minitest = SbtCommunityProject(
263276
project = "minitest",
264277
sbtTestCommand = "test",
278+
sbtDocCommand = "dotty-community-build/doc",
265279
dependencies = List(scalacheck)
266280
)
267281

268282
lazy val fastparse = SbtCommunityProject(
269283
project = "fastparse",
270284
sbtTestCommand = "dotty-community-build/compile;dotty-community-build/test:compile",
285+
// Problem parsing perftests/bench2/src/perftests/PythonParse.scala:[0..18..694]
286+
// sbtDocCommand = "dotty-community-build/doc"
271287
)
272288

273289
lazy val stdLib213 = SbtCommunityProject(
274290
project = "stdLib213",
275291
extraSbtArgs = List("-Dscala.build.compileWithDotty=true"),
276292
sbtTestCommand = """library/compile""",
277293
sbtPublishCommand = """set publishArtifact in (library, Compile, packageDoc) := false ;library/publishLocal""",
294+
// sbtDocCommand = "library/doc" // Does no compile? No idea :/
278295
)
279296

297+
280298
lazy val shapeless = SbtCommunityProject(
281299
project = "shapeless",
282300
sbtTestCommand = "test",
301+
sbtDocCommand = "doc"
283302
)
284303

285304
lazy val xmlInterpolator = SbtCommunityProject(
286305
project = "xml-interpolator",
287306
sbtTestCommand = "test",
307+
sbtDocCommand = "doc", // Again we've got problem with extensions
288308
)
289309

290310
lazy val effpi = SbtCommunityProject(
@@ -300,6 +320,7 @@ object projects:
300320
// sbtTestCommand = "set ThisBuild / useEffpiPlugin := false; effpi/test:compile; plugin/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
301321

302322
sbtTestCommand = "set ThisBuild / useEffpiPlugin := false; effpi/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
323+
sbtDocCommand = "set ThisBuild / useEffpiPlugin := false; effpi/doc; benchmarks/doc; examples/doc; pluginBenchmarks/doc",
303324
)
304325

305326
// TODO @odersky? It got broken by #5458
@@ -311,70 +332,81 @@ object projects:
311332
lazy val sconfig = SbtCommunityProject(
312333
project = "sconfig",
313334
sbtTestCommand = "sconfigJVM/test",
335+
sbtDocCommand = "sconfigJVM/doc",
314336
)
315337

316338
lazy val zio = SbtCommunityProject(
317339
project = "zio",
318340
sbtTestCommand = "testJVMDotty",
341+
// sbtDocCommand = "coreJVM/doc",
342+
// Fails on tasty unpickling https://github.com/lampepfl/dotty/issues/10499
319343
)
320344

321345
lazy val munit = SbtCommunityProject(
322-
project = "munit",
323-
sbtTestCommand = "testsJVM/test;testsJS/test;",
324-
// Hardcode the version to avoid having to deal with something set by sbt-dynver
325-
sbtPublishCommand = s"""set every version := "${Versions.munit}"; munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal""",
326-
dependencies = List(scalacheck)
346+
project = "munit",
347+
sbtTestCommand = "testsJVM/test",
348+
sbtDocCommand = "munitJVM/doc",
327349
)
328350

329351
lazy val scodecBits = SbtCommunityProject(
330352
project = "scodec-bits",
331353
sbtTestCommand = "coreJVM/test;coreJS/test",
332354
// Hardcode the version to avoid having to deal with something set by sbt-git
333355
sbtPublishCommand = s"""set every version := "${Versions.scodecBits}"; coreJVM/publishLocal;coreJS/publishLocal""",
356+
sbtDocCommand = "coreJVM/doc",
334357
dependencies = List(munit)
335358
)
336359

337360
lazy val scodec = SbtCommunityProject(
338361
project = "scodec",
339362
sbtTestCommand = "unitTests/test",
363+
// Adds <empty> package
364+
sbtDocCommand = "coreJVM/doc",
340365
dependencies = List(munit, scodecBits)
341366
)
342367

343368
lazy val scalaParserCombinators = SbtCommunityProject(
344369
project = "scala-parser-combinators",
345370
sbtTestCommand = "parserCombinatorsJVM/test",
371+
sbtDocCommand = "parserCombinatorsJVM/doc",
346372
)
347373

348374
lazy val dottyCpsAsync = SbtCommunityProject(
349375
project = "dotty-cps-async",
350376
sbtTestCommand = "test",
377+
sbtDocCommand = "doc",
351378
)
352379

353380
lazy val scalaz = SbtCommunityProject(
354381
project = "scalaz",
355382
sbtTestCommand = "rootJVM/test",
356-
// has doc/sources set to Nil
383+
sbtDocCommand = "rootJVM/doc",
357384
dependencies = List(scalacheck)
358385
)
359386

360387
lazy val endpoints4s = SbtCommunityProject(
361388
project = "endpoints4s",
362-
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"
389+
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",
390+
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",
363391
)
364392

365393
lazy val catsEffect2 = SbtCommunityProject(
366394
project = "cats-effect-2",
367-
sbtTestCommand = "test"
395+
sbtTestCommand = "test",
396+
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc",
368397
)
369398

370399
lazy val catsEffect3 = SbtCommunityProject(
371400
project = "cats-effect-3",
372-
sbtTestCommand = "testIfRelevant"
401+
sbtTestCommand = "testIfRelevant",
402+
// The problem is that testIfRelevant does not compile and project does not compile
403+
// sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
373404
)
374405

375406
lazy val scalaParallelCollections = SbtCommunityProject(
376407
project = "scala-parallel-collections",
377408
sbtTestCommand = "test",
409+
sbtDocCommand = "doc",
378410
dependencies = List(scalacheck)
379411
)
380412

@@ -402,9 +434,7 @@ object projects:
402434
"scalatest" -> scalatest,
403435
"scalatestplusScalacheck" -> scalatestplusScalacheck,
404436
"scalaXml" -> scalaXml,
405-
"scopt" -> scopt,
406437
"scalap" -> scalap,
407-
"squants" -> squants,
408438
"betterfiles" -> betterfiles,
409439
"ScalaPB" -> ScalaPB,
410440
"minitest" -> minitest,
@@ -424,7 +454,8 @@ object projects:
424454
"endpoints4s" -> endpoints4s,
425455
"catsEffect2" -> catsEffect2,
426456
"catsEffect3" -> catsEffect3,
427-
"scalaCollectionCompat" -> scalaCollectionCompat
457+
"scalaCollectionCompat" -> scalaCollectionCompat,
458+
"scalaParallelCollections" -> scalaParallelCollections,
428459
)
429460
def apply(key: String) = projectMap(key)
430461

0 commit comments

Comments
 (0)