Hi friends! When trying to generate HTML + Javadoc...
# dokka
p
Hi friends! When trying to generate HTML + Javadoc, I get the following warning:
Copy code
w: [:dokkaGeneratePublicationHtml] Couldn't resolve link for io.ktor.client.plugins.ClientRequestException in <file>/<fully qualified method>
In the KDoc, I tried
Copy code
@throws io.ktor.client.plugins.ClientRequestException <description>
and
Copy code
@throws ClientRequestException <description>
with no luck. It's a KMP library. Any suggestions on what's happening? First time I stumbled upon this warning, and since we enable
failOnWarning
, we cannot move. πŸ™‚ Thanks!
c
Copy code
dokkaSourceSets.configureEach {
    externalDocumentationLinks.register("ktor") {
        url.set(URI("<https://api.ktor.io/>"))
    }
}
gratitude thank you 1
πŸ”₯ 1
p
Thanks, @CLOVIS! 😊 The warnings are still there, but I got a starting point. I will keep you posted on my findings.
(Junie is trying for more than 10 minutes to find a solution... πŸ˜… )
Unfortunately, no luck so far. 😒 I tried other combinations as well, but the warnings persist (I even get a warning with
Flow
not being resolved). Junie tried for more than 20 minutes, and, at the end, it threw the towel by replacing
@throws
in the KDoc by
Throws ...
(plain text), so it wouldn't get processed by Dokka...
o
Am I right that you have only one target configured there?
p
Hi Oleg! Yes, that's correct. πŸ˜‰ We plan to cover more targets in the near future, but for now it's only JVM.
o
Would you mind adding one more web (js/wasm.js) target or two native targets (iOS X64 and Arm64) and rechecking if the logs are present? πŸ™‚ It might be the same as in https://github.com/Kotlin/dokka/issues/3386#issuecomment-3461987029
πŸ‘ 1
p
@Oleg Yukhnevich: I added the external documentation links (per Ivan's suggestion) and (locally) added
linuxX64()
as target. Good news! The warnings were reduced from 4 to one (two were from Ktor, one from coroutines). πŸŽ‰ There's only one remaining warning, this time from an unresolved link for
java.io.IOException
. Now that included a native target, I noticed that our common code has some JVM-specific things, but since we were only targeting the JVM, the code worked like a charm. I will check our code and fix those inconsistences. 😁 That said, I think the issue is indeed related. I will dig more and see what I can find. Thanks!
o
Nice! Thanks for confirming the cause of the issue!