Skip to content

Commit b49b7a7

Browse files
reid-spencerclaude
andcommitted
Disable Native scaladoc to avoid 3.8.3 doc race condition
Scala 3.8.3's scaladoc renderer has a race in dotty.tools.scaladoc.renderers.Resources.allResources that crashes when multiple `doc` tasks run concurrently. It bit `riddlLibNative` and `passesNative` during `sbt clean test publish` for both 1.23.2 and 1.23.3, leaving partial Maven artifacts on GitHub Packages. Each individual `doc` task succeeds when invoked alone, confirming concurrency as the trigger. Set `Compile / doc / sources := Seq.empty` for the Native variants of `passes` and `riddlLib` so the doc task produces no output. The empty javadoc.jar still publishes for shape compatibility. Native consumers very rarely consult the docs jar; JVM and JS scaladoc are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8f12378 commit b49b7a7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build.sbt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ lazy val passes_cp = CrossModule("passes", "riddl-passes")(JVM, JS, Native)
242242
.jsConfigure(With.noMiMa)
243243
.nativeConfigure(With.Native(mode = "fast"))
244244
.nativeConfigure(With.noMiMa)
245+
// Scala 3.8.3 scaladoc has a race condition in
246+
// Resources.allResources that crashes intermittently when multiple `doc`
247+
// tasks run concurrently under `publish`. Disabling Native scaladoc
248+
// avoids the race; Native consumers rarely consult the docs jar.
249+
.nativeSettings(Compile / doc / sources := Seq.empty)
245250
val passes = passes_cp.jvm
246251
val passesJS = passes_cp.js
247252
val passesNative = passes_cp.native
@@ -325,6 +330,8 @@ lazy val riddlLib_cp: CrossProject = CrossModule("riddlLib", "riddl-lib")(JS, JV
325330
))
326331
.nativeConfigure(With.Native(mode = "fast", buildTarget = "static"))
327332
.nativeConfigure(With.noMiMa)
333+
// See note on passes_cp re: Scala 3.8.3 scaladoc race condition.
334+
.nativeSettings(Compile / doc / sources := Seq.empty)
328335
val riddlLib = riddlLib_cp.jvm
329336
val riddlLibJS = riddlLib_cp.js
330337
val riddlLibNative = riddlLib_cp.native

0 commit comments

Comments
 (0)