Skip to content

Conversation

@WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Nov 23, 2025

This changes can be used as best effort mitigation of underlying issues allowing for produce javadoc for scala-library required when publishing artifacts to Sonatype, however I don't believe it's a final solution of underlying issues. Some types seem not be rendered correctly, see details below

image

edit

Actually it seems to not be related to this change, similar problems are visible when using scaladoc/generateScalaDocumentation (the non-bootstrapped variant)

image

Created a dedicated issue #24511

Depends on #24433 changes, rebase required before merge

During scaladoc generation with --from-tasty, the compiler reads TASTY files in Mode.ReadPositions. Symbols may be incomplete, phases may not be set up, and some validation checks run that shouldn't during TASTY reading. This caused crashes and false errors.

Error 1: Assertion failure in base class computation

java.lang.AssertionError: assertion failed: class Tuple2 has non-class parent: TypeRef(TermRef(TermRef(NoPrefix,object _root_),object scala),Serializable)
    at dotty.tools.dotc.core.SymDenotations$ClassDenotation.traverse$1(SymDenotations.scala:2056)
    at dotty.tools.dotc.core.SymDenotations$ClassDenotation.computeBaseData(SymDenotations.scala:2061)
    ...
    at dotty.tools.dotc.fromtasty.ReadTasty.addTasty(ReadTasty.scala:33)

Error 2: Assertion failure in TreeInfo.sliceTopLevel

java.lang.AssertionError: assertion failed
    at dotty.tools.dotc.ast.TypedTreeInfo.sliceTopLevel(TreeInfo.scala:1015)
    at dotty.tools.dotc.transform.SetRootTree$$anon$1.traverse(SetRootTree.scala:33)
    ...
    at dotty.tools.dotc.typer.Namer.lateTypeCheck$1(Namer.scala:772)

Error 3: Assertion failure in implicit search

java.lang.AssertionError: assertion failed: missing implicit parameter of type G[From] after typer at phase <no phase>
    at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1103)
    ...
    at dotty.tools.dotc.typer.Namer.lateTypeCheck$1(Namer.scala:770)

Error 4-6: False validation errors (only during --from-tasty)

  • Capture checking: scala.caps.cap.type cannot be tracked since it is not a parameter or local value
  • Naming conflicts: class consume cannot have the same name as class consume in object internal
  • TargetName clashes: @targetName annotation "" clashes with other definition in same scope

Enable `packageDoc / publishArtifact` for bootstrapped projects - javadoc is required by Sonatype validation
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