Skip to content

fix: don't treat scaladoc warnings as fatal so publishM2Local succeeds - #1033

Merged
stephenamar-db merged 1 commit into
masterfrom
fix-scaladoc-publish
Jun 24, 2026
Merged

stephenamar-db merged 1 commit into
masterfrom
fix-scaladoc-publish

Conversation

@stephenamar-db

@stephenamar-db stephenamar-db commented Jun 24, 2026 •

Copy link
Copy Markdown
Collaborator

Override scalaDocOptions to strip the fatal-warning flags for doc generation only. Compilation stays strict (-Werror still applies to compile). ./mill 'sjsonnet.jvm[_].publishM2Local' now succeeds and emits -javadoc.jar for Scala 3.3.7, 2.13.18, and 2.12.21.

`scalaDocGenerated` derives its options solely from `scalaDocOptions`,
whose Mill default folds in `scalacOptions` — which include the
fatal-warning flags (`-Werror`, and `-Xfatal-warnings` on 2.12). As a
result `docJar` (and therefore `publishM2Local`) failed on the ~93
scaladoc-only warnings: cross-links to external libraries not on the doc
classpath (e.g. `upickle.core.Visitor`, `ujson.Value`) and doc comments
on the per-builtin entries inside the stdlib `Seq` literals.

Override `scalaDocOptions` to strip the fatal-warning flags for doc
generation only. Compilation stays strict (`-Werror` still applies to
`compile`). `./mill 'sjsonnet.jvm[_].publishM2Local'` now succeeds and
emits `-javadoc.jar` for Scala 3.3.7, 2.13.18, and 2.12.21.

Co-authored-by: Isaac
@stephenamar-db
stephenamar-db merged commit b7ff4b1 into master Jun 24, 2026
5 checks passed
@stephenamar-db
stephenamar-db deleted the fix-scaladoc-publish branch June 24, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant