Skip to content

Dokka should not generate links (and warn about it) to classes excluded from rendered documentation #4448

@fzhinkin

Description

@fzhinkin

If a KDoc contains links to non-public (published internal, for example) symbols or symbols explicitly excluded from the rendered docs (via skipDeprecated or perPackageOption.matchingRegex + suppress), Dokka will not emit any warnings and will insert links leading to a non existing page.

For example, in kotlinx-datetime:

  1. There is a public declaration that uses @Published internal serializer. Rendered documentation contains a link to a serializer, but it leads to a non-existent page.
Image
  1. There were links to [Instant] class in KDoc that were resolved to kotlinx.datetime.Instant, which was deprecated and all deprecated symbols are explicitly hidden in rendered docs (skipDeprecated.set(true)). However, rendered docs contained links to a non-existent kotlinx.datetime.Instant page.

In both cases, Dokka did not emit any warning when generating docs.

Ideally, Dokka should not render links to symbols excluded from the documentation and warn developers about such links.

Environment
While kotlinx-datetime is still using Dokka 2.0.0, I also double checked it with 2.1.0 and the result was the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions