Strip -scalajs from scaladoc invocation - #4431
Merged
Merged
Conversation
…rash scaladoc inherits the full project scalacOptions, including -scalajs for Scala.js builds. That flag makes scaladoc run JS backend codegen phases (e.g. JUnitBootstrappers), which crash on otherwise valid code (VirtusLab#3006). The generated doc content is platform-agnostic, so drop the flag before invoking scaladoc. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
scala-cli doc --native . already works fine, unpatched |
Gedochao
reviewed
Aug 18, 2026
Makes the workaround from the previous commit visible instead of silent.
Gedochao
approved these changes
Aug 19, 2026
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.
scaladoc inherits the full project scalacOptions, including -scalajs for Scala.js builds. That flag makes scaladoc run JS backend codegen phases (e.g. JUnitBootstrappers), which crash on otherwise valid code (#3006). The generated doc content is platform-agnostic, so drop the flag before invoking scaladoc.
Fixes #3006)
Checklist
scala-cli fmt .)scalafix(./mill -i __.fix)./mill -i 'generate-reference-doc[]'.run)How much have you relied on LLM-based tools in this contribution?
extensively, I've reviewed the output
How was the solution tested?
a new integration test added
Additional notes
Current workaround: https://github.com/halotukozak-com/made/blob/main/.github/workflows/publish.yml