Develop a documentation format for easier integration with tools, similar to javadoc.jar
#2787
Labels
kdoc-spec
An issue that requires clarification from the KDoc spec's perspective
Use case / Problem
This request is inspired primarily by #215. At the moment, if you want to import your KDoc documentation into IntelliJ IDEA (to be able to see quick docs without downloading source code), you have to go through generating a
javadoc.jar
with Java signatures, which, supposedly, get translated to Kotlin signatures at the time of displaying the docs in IntelliJ.This abstraction sometimes leaks from both ends, which causes bugs/missing documentation/etc. Moreover, it places additional burden on Dokka to keep the Javadoc format up-to-date and with minimal integration bugs (that means, copying Java's Javadoc HTML as closely as possible), even though the format is still in Alpha.
At the moment, closed-source libraries that do not want to publish source code via
sources.jar
, but want to give the users the ability to view documentation from IntelliJ IDEA (or some other tool), suffer from the lack of proper integration the most.To sum up: there's no native and proper way to integrate Kotlin API documentation with tooling. The only way is to generate an intermediate
javadoc.jar
with the Javadoc format and Java code signatures inside, but it leads to inaccuracies and bugs.Possible solution
KDoc spec could describe a format dedicated specifically for integrations with tooling.
For instance, it could be a simple JSON file with something like the following:
Dokka (or some other community tool, or even the compiler) could then build these files from source code according to the spec.
IntelliJ IDEA (or some other tools that need this information) would then support parsing and processing of such files according to the spec.
Having it be part of the KDoc spec would add credibility and put less strain on Dokka, allowing generating and importing tools to be developed independently of each other.
The text was updated successfully, but these errors were encountered: