Skip to content

Commit 0af06db

Browse files
committed
Scala3doc: ensure all projects we're documenting are compiled
1 parent 1ab76c1 commit 0af06db

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

project/Build.scala

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,14 +1490,20 @@ object Build {
14901490
generateDocumentation(classDirectory.in(Compile).value.getAbsolutePath, "scala3doc", "self", "-p documentation")
14911491
}.value,
14921492
generateScala3Documentation := Def.taskDyn {
1493+
// ensure all projects we're documenting are compiled
1494+
(`scala3-interfaces`/Compile/compile).value
1495+
(`tasty-core`/Compile/compile).value
1496+
(`scala3-library`/Compile/compile).value
1497+
// TODO we can't load stdlib from Tasty
1498+
// (`stdlib-bootstrapped`/Compile/compile).value
1499+
14931500
val dottyJars = Seq(
1494-
// All projects below will be used to generated documentation for Scala 3
1495-
classDirectory.in(`scala3-interfaces`).in(Compile).value,
1496-
classDirectory.in(`tasty-core`).in(Compile).value,
1497-
classDirectory.in(`scala3-library`).in(Compile).value,
1498-
// TODO this one fails to load using TASTY
1499-
// classDirectory.in(`stdlib-bootstrapped`).in(Compile).value,
1501+
(`scala3-interfaces`/Compile/classDirectory).value,
1502+
(`tasty-core`/Compile/classDirectory).value,
1503+
(`scala3-library`/Compile/classDirectory).value,
1504+
// (`stdlib-bootstrapped`/Compile/classDirectory).value,
15001505
)
1506+
15011507
val roots = dottyJars.map(_.toString).mkString(java.io.File.pathSeparator)
15021508

15031509
if (dottyJars.isEmpty) Def.task { streams.value.log.error("Dotty lib wasn't found") }

0 commit comments

Comments
 (0)