@@ -141,6 +141,16 @@ final case class SbtCommunityProject(
141
141
142
142
object projects :
143
143
144
+ private def forceDoc (projects : String * ) =
145
+ projects.map(project =>
146
+ s """ ;set $project/Compile/doc/sources ++= file("a.scala") +: ( $project/Compile/doc/tastyFiles).value ; $project/doc """
147
+ ).mkString(" " )
148
+
149
+ private def aggregateDoc (in : String )(projects : String * ) =
150
+ val tastyFiles =
151
+ (in +: projects).map(p => s " ( $p/Compile/doc/tastyFiles).value " ).mkString(" ++ " )
152
+ s """ ;set $in/Compile/doc/sources ++= file("a.scala") +: ( $tastyFiles) ; $in/doc """
153
+
144
154
lazy val utest = MillCommunityProject (
145
155
project = " utest" ,
146
156
baseCommand = s " utest.jvm[ $compilerVersion] " ,
@@ -219,14 +229,14 @@ object projects:
219
229
lazy val algebra = SbtCommunityProject (
220
230
project = " algebra" ,
221
231
sbtTestCommand = " coreJVM/compile" ,
222
- sbtDocCommand = " coreJVM/doc "
232
+ sbtDocCommand = forceDoc( " coreJVM" )
223
233
)
224
234
225
235
lazy val scalacheck = SbtCommunityProject (
226
236
project = " scalacheck" ,
227
237
sbtTestCommand = " jvm/test;js/test" ,
228
238
sbtPublishCommand = " jvm/publishLocal;js/publishLocal" ,
229
- sbtDocCommand = " jvm/doc "
239
+ sbtDocCommand = forceDoc( " jvm" )
230
240
)
231
241
232
242
lazy val scalatest = SbtCommunityProject (
@@ -269,13 +279,17 @@ object projects:
269
279
lazy val ScalaPB = SbtCommunityProject (
270
280
project = " ScalaPB" ,
271
281
sbtTestCommand = " dotty-community-build/compile" ,
272
- sbtDocCommand = " dotty-community-build/doc"
282
+ // aggregateDoc("runtimeJVM")("scalapbc", "grpcRuntime", "compilerPlugin") fails with
283
+ // module class ScalaPbCodeGenerator$ has non-class parent: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module protocbridge),ProtocCodeGenerator)
284
+ // Also it seems that we do not handle correctly aggreagation projects
285
+ // sbtDocCommand = "dotty-community-build/doc"
286
+ sbtDocCommand = forceDoc(" scalapbc" , " grpcRuntime" ," runtimeJVM" , " compilerPlugin" )
273
287
)
274
288
275
289
lazy val minitest = SbtCommunityProject (
276
290
project = " minitest" ,
277
291
sbtTestCommand = " test" ,
278
- sbtDocCommand = " dotty-community-build/doc " ,
292
+ sbtDocCommand = aggregateDoc( " lawsJVM " )( " minitestJVM " ) ,
279
293
dependencies = List (scalacheck)
280
294
)
281
295
@@ -298,7 +312,7 @@ object projects:
298
312
lazy val shapeless = SbtCommunityProject (
299
313
project = " shapeless" ,
300
314
sbtTestCommand = " test" ,
301
- sbtDocCommand = " doc "
315
+ sbtDocCommand = forceDoc( " typeable " , " deriving " , " data " )
302
316
)
303
317
304
318
lazy val xmlInterpolator = SbtCommunityProject (
@@ -332,13 +346,15 @@ object projects:
332
346
lazy val sconfig = SbtCommunityProject (
333
347
project = " sconfig" ,
334
348
sbtTestCommand = " sconfigJVM/test" ,
335
- sbtDocCommand = " sconfigJVM/doc" ,
349
+ // sbtDocCommand = "sconfigJVM/doc", // Fails with:
350
+ // Problem parsing sconfig/sharedScala3/src/main/scala/org/ekrich/config/ConfigSyntax.scala:[73..92..1340], documentation may not be generated.
351
+ // scala.MatchError: ValDef(JSON,TypeTree[TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class ekrich)),module config),class ConfigSyntax)],Apply(Ident($new),List(Literal(Constant(0)), Literal(Constant(JSON))))) (of class dotty.tools.dotc.ast.Trees$ValDef)
336
352
)
337
353
338
354
lazy val zio = SbtCommunityProject (
339
355
project = " zio" ,
340
356
sbtTestCommand = " testJVMDotty" ,
341
- // sbtDocCommand = "coreJVM/doc" ,
357
+ // sbtDocCommand = forceDoc( "coreJVM") ,
342
358
// Fails on tasty unpickling https://github.com/lampepfl/dotty/issues/10499
343
359
)
344
360
@@ -368,19 +384,33 @@ object projects:
368
384
lazy val scalaParserCombinators = SbtCommunityProject (
369
385
project = " scala-parser-combinators" ,
370
386
sbtTestCommand = " parserCombinatorsJVM/test" ,
371
- sbtDocCommand = " parserCombinatorsJVM/doc " ,
387
+ sbtDocCommand = forceDoc( " parserCombinatorsJVM" ) ,
372
388
)
373
389
374
390
lazy val dottyCpsAsync = SbtCommunityProject (
375
391
project = " dotty-cps-async" ,
376
392
sbtTestCommand = " test" ,
377
- sbtDocCommand = " doc" ,
393
+ // Does not compile (before reaches doc)
394
+ // sbtDocCommand = "cpsJVM/doc",
378
395
)
379
396
380
397
lazy val scalaz = SbtCommunityProject (
381
398
project = " scalaz" ,
382
399
sbtTestCommand = " rootJVM/test" ,
383
- sbtDocCommand = " rootJVM/doc" ,
400
+
401
+ // sbtDocCommand = forceDoc("coreJVM"), // Fails with:
402
+ // [error] class scalaz.Conts cannot be unpickled because no class file was found
403
+ // [error] class scalaz.ContsT cannot be unpickled because no class file was found
404
+ // [error] class scalaz.IndexedCont cannot be unpickled because no class file was found
405
+
406
+ // aggregateDoc("rootJVM")("effectJVM", "iterateeJVM"), // Fails With
407
+ // [error] Caused by: java.lang.AssertionError: assertion failed:
408
+ // trait MonadIO has non-class parent: AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module scalaz),Monad),List(TypeRef(ThisType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class scalaz)),module effect),trait MonadIO)),type F)))
409
+
410
+ // sbtDocCommand = forceDoc("iterateeJVM"), // Fails with
411
+ // [error] class scalaz.iteratee.Iteratee cannot be unpickled because no class file was found
412
+
413
+ sbtDocCommand = forceDoc(" effectJVM" ),
384
414
dependencies = List (scalacheck)
385
415
)
386
416
@@ -393,7 +423,8 @@ object projects:
393
423
lazy val catsEffect2 = SbtCommunityProject (
394
424
project = " cats-effect-2" ,
395
425
sbtTestCommand = " test" ,
396
- sbtDocCommand = " ;coreJVM/doc ;lawsJVM/doc" ,
426
+ // Currently is excluded from community build
427
+ // sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc",
397
428
)
398
429
399
430
lazy val catsEffect3 = SbtCommunityProject (
@@ -406,8 +437,8 @@ object projects:
406
437
lazy val scalaParallelCollections = SbtCommunityProject (
407
438
project = " scala-parallel-collections" ,
408
439
sbtTestCommand = " test" ,
409
- sbtDocCommand = " doc " ,
410
- dependencies = List (scalacheck)
440
+ sbtDocCommand = forceDoc( " core " ) ,
441
+ dependencies = List (scalacheck)
411
442
)
412
443
413
444
lazy val scalaCollectionCompat = SbtCommunityProject (
0 commit comments