@@ -123,6 +123,16 @@ final case class SbtCommunityProject(
123
123
124
124
object projects :
125
125
126
+ private def forceDoc (projects : String * ) =
127
+ projects.map(project =>
128
+ s """ ;set $project/Compile/doc/sources ++= file("a.scala") +: ( $project/Compile/doc/tastyFiles).value ; $project/doc """
129
+ ).mkString(" " )
130
+
131
+ private def aggregateDoc (in : String )(projects : String * ) =
132
+ val tastyFiles =
133
+ (in +: projects).map(p => s " ( $p/Compile/doc/tastyFiles).value " ).mkString(" ++ " )
134
+ s """ ;set $in/Compile/doc/sources ++= file("a.scala") +: ( $tastyFiles) ; $in/doc """
135
+
126
136
lazy val utest = MillCommunityProject (
127
137
project = " utest" ,
128
138
baseCommand = s " utest.jvm[ $compilerVersion] " ,
@@ -201,14 +211,14 @@ object projects:
201
211
lazy val algebra = SbtCommunityProject (
202
212
project = " algebra" ,
203
213
sbtTestCommand = " coreJVM/compile" ,
204
- sbtDocCommand = " coreJVM/doc "
214
+ sbtDocCommand = forceDoc( " coreJVM" )
205
215
)
206
216
207
217
lazy val scalacheck = SbtCommunityProject (
208
218
project = " scalacheck" ,
209
219
sbtTestCommand = " jvm/test;js/test" ,
210
220
sbtPublishCommand = " jvm/publishLocal;js/publishLocal" ,
211
- sbtDocCommand = " jvm/doc "
221
+ sbtDocCommand = forceDoc( " jvm" )
212
222
)
213
223
214
224
lazy val scalatest = SbtCommunityProject (
@@ -251,13 +261,17 @@ object projects:
251
261
lazy val ScalaPB = SbtCommunityProject (
252
262
project = " ScalaPB" ,
253
263
sbtTestCommand = " dotty-community-build/compile" ,
254
- sbtDocCommand = " dotty-community-build/doc"
264
+ // aggregateDoc("runtimeJVM")("scalapbc", "grpcRuntime", "compilerPlugin") fails with
265
+ // module class ScalaPbCodeGenerator$ has non-class parent: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module protocbridge),ProtocCodeGenerator)
266
+ // Also it seems that we do not handle correctly aggreagation projects
267
+ // sbtDocCommand = "dotty-community-build/doc"
268
+ sbtDocCommand = forceDoc(" scalapbc" , " grpcRuntime" ," runtimeJVM" , " compilerPlugin" )
255
269
)
256
270
257
271
lazy val minitest = SbtCommunityProject (
258
272
project = " minitest" ,
259
273
sbtTestCommand = " test" ,
260
- sbtDocCommand = " dotty-community-build/doc " ,
274
+ sbtDocCommand = aggregateDoc( " lawsJVM " )( " minitestJVM " ) ,
261
275
dependencies = List (scalacheck)
262
276
)
263
277
@@ -280,7 +294,7 @@ object projects:
280
294
lazy val shapeless = SbtCommunityProject (
281
295
project = " shapeless" ,
282
296
sbtTestCommand = " test" ,
283
- sbtDocCommand = " doc "
297
+ sbtDocCommand = forceDoc( " typeable " , " deriving " , " data " )
284
298
)
285
299
286
300
lazy val xmlInterpolator = SbtCommunityProject (
@@ -314,13 +328,15 @@ object projects:
314
328
lazy val sconfig = SbtCommunityProject (
315
329
project = " sconfig" ,
316
330
sbtTestCommand = " sconfigJVM/test" ,
317
- sbtDocCommand = " sconfigJVM/doc" ,
331
+ // sbtDocCommand = "sconfigJVM/doc", // Fails with:
332
+ // Problem parsing sconfig/sharedScala3/src/main/scala/org/ekrich/config/ConfigSyntax.scala:[73..92..1340], documentation may not be generated.
333
+ // 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)
318
334
)
319
335
320
336
lazy val zio = SbtCommunityProject (
321
337
project = " zio" ,
322
338
sbtTestCommand = " testJVMDotty" ,
323
- // sbtDocCommand = "coreJVM/doc" ,
339
+ // sbtDocCommand = forceDoc( "coreJVM") ,
324
340
// Fails on tasty unpickling https://github.com/lampepfl/dotty/issues/10499
325
341
)
326
342
@@ -349,19 +365,33 @@ object projects:
349
365
lazy val scalaParserCombinators = SbtCommunityProject (
350
366
project = " scala-parser-combinators" ,
351
367
sbtTestCommand = " parserCombinatorsJVM/test" ,
352
- sbtDocCommand = " parserCombinatorsJVM/doc " ,
368
+ sbtDocCommand = forceDoc( " parserCombinatorsJVM" ) ,
353
369
)
354
370
355
371
lazy val dottyCpsAsync = SbtCommunityProject (
356
372
project = " dotty-cps-async" ,
357
373
sbtTestCommand = " test" ,
358
- sbtDocCommand = " doc" ,
374
+ // Does not compile (before reaches doc)
375
+ // sbtDocCommand = "cpsJVM/doc",
359
376
)
360
377
361
378
lazy val scalaz = SbtCommunityProject (
362
379
project = " scalaz" ,
363
380
sbtTestCommand = " rootJVM/test" ,
364
- sbtDocCommand = " rootJVM/doc" ,
381
+
382
+ // sbtDocCommand = forceDoc("coreJVM"), // Fails with:
383
+ // [error] class scalaz.Conts cannot be unpickled because no class file was found
384
+ // [error] class scalaz.ContsT cannot be unpickled because no class file was found
385
+ // [error] class scalaz.IndexedCont cannot be unpickled because no class file was found
386
+
387
+ // aggregateDoc("rootJVM")("effectJVM", "iterateeJVM"), // Fails With
388
+ // [error] Caused by: java.lang.AssertionError: assertion failed:
389
+ // 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)))
390
+
391
+ // sbtDocCommand = forceDoc("iterateeJVM"), // Fails with
392
+ // [error] class scalaz.iteratee.Iteratee cannot be unpickled because no class file was found
393
+
394
+ sbtDocCommand = forceDoc(" effectJVM" ),
365
395
dependencies = List (scalacheck)
366
396
)
367
397
@@ -374,7 +404,8 @@ object projects:
374
404
lazy val catsEffect2 = SbtCommunityProject (
375
405
project = " cats-effect-2" ,
376
406
sbtTestCommand = " test" ,
377
- sbtDocCommand = " ;coreJVM/doc ;lawsJVM/doc" ,
407
+ // Currently is excluded from community build
408
+ // sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc",
378
409
forceUpgradeSbtScalajsPlugin = true
379
410
)
380
411
@@ -388,8 +419,8 @@ object projects:
388
419
lazy val scalaParallelCollections = SbtCommunityProject (
389
420
project = " scala-parallel-collections" ,
390
421
sbtTestCommand = " test" ,
391
- sbtDocCommand = " doc " ,
392
- dependencies = List (scalacheck)
422
+ sbtDocCommand = forceDoc( " core " ) ,
423
+ dependencies = List (scalacheck)
393
424
)
394
425
395
426
lazy val scalaCollectionCompat = SbtCommunityProject (
0 commit comments