Skip to content

Publish an empty javadoc JAR instead of building scaladoc - #125

Merged
rochala merged 1 commit into
mainfrom
drop-scaladoc-from-release
Aug 19, 2026
Merged

Publish an empty javadoc JAR instead of building scaladoc#125
rochala merged 1 commit into
mainfrom
drop-scaladoc-from-release

Conversation

@rochala

@rochala rochala commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The v0.1.0 release run died in publish-maven:

-- Error: core/shared/src/main/scala/fs2/Chunk.scala:1462:2 --
undefined: new org.typelevel.scalaccompat.annotation.package.nowarn213 ... at readTasty
[error] lib.scalaDocGenerated scaladoc generation failed

Scaladoc choked reading fs2's TASTy, not any cellar source — nothing we can fix, and it aborts the release after every native binary and the assembly JAR have already been built.

Cellar is on Maven Central for exactly one reason: the coursier apps descriptor reads maven-metadata.xml for cellar-lib_3 to find the latest version. Nobody depends on these JARs as a library, so the bundled scaladoc has no readers and is not worth a failed release.

Change

docJar is overridden in a new shared CellarPublishModule (mixed into lib, profilingRuntime, cli) to emit an empty JAR. Sonatype Central still requires a -javadoc.jar to exist, so the artifact is still published and still PGP-signed — it just contains nothing and costs nothing to build.

scalaDocGenerated is untouched; ./mill lib.scalaDocGenerated still works locally for anyone who wants the docs.

Verification

  • ./mill lib.docJar → 1 task, no compilation, JAR contains only META-INF/MANIFEST.MF
  • ./mill show lib.publishArtifacts → still lists cellar-lib_3-<version>-javadoc.jar alongside the pom, jar, and sources jar

No CI job was added: a scaladoc check would go red on dependency bugs we can't act on.

🤖 Generated with Claude Code

@rochala
rochala force-pushed the drop-scaladoc-from-release branch from 8b2c450 to e1fceb9 Compare August 19, 2026 11:03
The v0.1.0 release failed in `publish-maven` with `lib.scalaDocGenerated
scaladoc generation failed` — scaladoc errored while reading fs2's
`Chunk.scala` TASTy (`undefined: new nowarn213`), not on any cellar source.
That is unfixable from here and it aborts the release after the native
binaries and JAR have already been built.

Cellar is on Maven Central only so coursier can resolve its latest version
via `maven-metadata.xml`; nothing consumes these artifacts as a library, so
the bundled scaladoc has no readers. Override `docJar` in a shared
`CellarPublishModule` to emit an empty JAR — Central still requires the
`-javadoc.jar` to exist, but nothing has to compile it. `scalaDocGenerated`
remains available for local use.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rochala
rochala force-pushed the drop-scaladoc-from-release branch from e1fceb9 to 37e3237 Compare August 19, 2026 11:11
@rochala
rochala merged commit ae214c9 into main Aug 19, 2026
5 checks passed
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