build: skip javadoc/sources jar packaging, fixing sbt stage#144
Merged
Conversation
sbt stage fails since cron4s landed (#141): native-packager's stage pulls packagedArtifacts, which builds every declared artifact — main jar, javadoc jar (running Compile/doc), sources jar — only for universalDepMappings to discard the doc/src jars from lib/. The scaladoc leg now dies reading cron4s-core 0.8.2's TASTy: its JVM jar bakes in scalajs-stubs annotations (JSExportTopLevel) that don't resolve on a JVM classpath, and Scala 3 scaladoc resolves annotations in dependency TASTy where the compiler doesn't need to. Declaring publishArtifact := false for Compile/packageDoc and Compile/packageSrc removes both jars from packagedArtifacts, so stage never invokes scaladoc (and stops zipping two jars it always threw away). A direct `sbt doc` still fails — upstream cron4s issue; nothing in CI or hooks runs it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sbt stagehas been failing since cron4s landed (#141):Two dormant things intersected:
Universal / mappings→projectDependencyArtifacts→ the project's ownpackagedArtifacts, which builds every declared artifact: main jar, javadoc jar (→Compile / doc), sources jar, pom.universalDepMappingsthen discards the doc/src jars fromlib/— they were always built and thrown away.JSExportTopLevel) into its JVM jar's TASTy (verified incron4s/Cron.tastyof the 0.8.2 jar). Scala 3 scaladoc resolves annotations in dependency TASTy where the compiler doesn't need to;scala.scalajs.*doesn't exist on a JVM classpath →readTastyerror.Fix
Compile / packageDoc / publishArtifact := falseand same forpackageSrcinbuild.sbt. Removes both jars frompackagedArtifacts, so stage never invokes scaladoc — and stops zipping two jars it never shipped.Known residual: a direct
sbt docstill fails (upstream cron4s issue). Nothing in CI, hooks, or tooling runs it.Testing
sbt stagecompletes (was failing); previously-built javadoc/sources jars not rebuiltlib/contains the three cron4s 0.8.2 jars;bin/ccas --helprunssbt testgreen via pre-push hook (997 tests)🤖 Generated with Claude Code