dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Kotlin's typealias is not handled correctly

Open IngoHaumann-TomTom opened this issue 3 years ago • 3 comments

Describe the bug When adding a typealias type to your project, the following happens:

  • It get recognized as a type and links to it get resolved.
  • All these links have targets that do not exist in the Dokka output.
  • The alias itself cannot be found using Dokka's search.

Expected behaviour A typealias is a Kotlin language feature and should be resolvable.

To Reproduce Add a public typealias BrokenType = SomeOtherGenericType<argument> to the Dokka input.

Dokka configuration Irrelevant.

Installation

  • Operating system: Linux
  • Build tool: Gradle v7.2
  • Dokka version: 1.5.31

IngoHaumann-TomTom avatar Jan 14 '22 16:01 IngoHaumann-TomTom

Hi! Thanks for the report

Testing it out on 1.6.10, I can see that the typealias definition itself indeed cannot be found using search, although it does find signatures where it is used

I want to clarify what exactly you mean by

All these links have targets that do not exist in the Dokka output.

If I click on BrokenType in the signature, it navigates me to its definition on the module's page. Perhaps that was fixed in 1.6 for the new format? Can you update and see if the problem you're having is gone?

usage page

after clicking, it focuses the definition

IgnatBeresnev avatar Jan 14 '22 18:01 IgnatBeresnev

What I mean is that Dokka finds the instances and makes them clickable, but the targets of those links do not exist; like they are not generated.

We have updating to 1.6 on our backlog, as we've noticed it's not just a matter of updating the version number.

IngoHaumann-TomTom avatar Jan 18 '22 13:01 IngoHaumann-TomTom

In 1.6.21, this issue still exists. You can come across it while clicking around, and it will end up on the typealias definition, but the high level search still cannot point you directly to that definition; only its usages. Since a typealias is a first-class citizen of Kotlin, it is expected to show up in search results directly.

IngoHaumann-TomTom avatar Jun 03 '22 09:06 IngoHaumann-TomTom

In Dokka 1.9.0 typealiases will have their own separate pages, so they will be clickable. Also, the search of typealises will be fixed.

vmishenev avatar Jun 30 '23 13:06 vmishenev