Skip to content

Commit 5923f77

Browse files
committed
Skip doc generation for nonbootstrapped projects
fix #25704 Previously, running `sbt publishLocal` causes scaladoc generation for `scala-library-nonbootstrapped` and `scala3-library-nonbootstrapped`. These two projects don't explicitly set `Compile / packageDoc / publishArtifact := false`, and therefore sbt defaults to generate doc jars on `publishLocal`. However, IIUC, there's no point of generating scaladoc for nonbootstrapped projects because these artifacts are only published locally for bootstrapping (and local development), and the bootstrapped projects reference packageBin outputs and don't care about packageDoc. In fact, other nonbootstrapped projects like `scala3-compiler-nonbootstrapped` and `tasty-core-nonbootstrapped` already set `packageDoc / publishArtifact := false`. In my local environemnt, clean build with `publishLocal`, previously took 230s, and not it took around 90s.
1 parent 6c411a6 commit 5923f77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

project/Build.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ object Build {
11271127
),
11281128
// Packaging configuration of the stdlib
11291129
Compile / publishArtifact := true,
1130+
Compile / packageDoc / publishArtifact := false,
11301131
Test / publishArtifact := false,
11311132
// Project specific target folder. sbt doesn't like having two projects using the same target folder
11321133
target := target.value / "scala-library-nonbootstrapped",
@@ -1176,6 +1177,7 @@ object Build {
11761177
emptyPublishedJarSettings, // Validate JAR is empty (only META-INF)
11771178
// Packaging configuration of the stdlib
11781179
Compile / publishArtifact := true,
1180+
Compile / packageDoc / publishArtifact := false,
11791181
Test / publishArtifact := false,
11801182
// Project specific target folder. sbt doesn't like having two projects using the same target folder
11811183
target := target.value / "scala3-library-nonbootstrapped",

0 commit comments

Comments
 (0)