What could be the reason that Dokka (1.8.10) fails...
# dokka
r
What could be the reason that Dokka (1.8.10) fails to find certain samples in a file where other methods linked to the same file via
@sample
are found? For instance, I get:
Copy code
Unresolved function ch.tutteli.atrium.api.infix.en_GB.samples.PathExpectationSamples.toBeARegularFile in @sample
which is here: https://github.com/robstoll/atrium/blob/main/apis/infix-en_GB/atrium-api-infix-en_[…]in/kotlin/ch/tutteli/atrium/api/infix/en_GB/pathExpectations.kt but I don't get a message for the following, which is in the same file and points to the same file (I can jump in intellij): https://github.com/robstoll/atrium/blob/main/apis/infix-en_GB/atrium-api-infix-en_[…]in/kotlin/ch/tutteli/atrium/api/infix/en_GB/pathExpectations.kt
r
no wrong api. The linking from api-fluent to the sample file you posted works all good. It's this one: https://github.com/robstoll/atrium/blob/7f01629c3eab3357af91e43e83fcfd1819188d36/a[…]utteli/atrium/api/infix/en_GB/samples/PathExpectationSamples.kt
i
Oh, then it's not really the same sample file, is it... So linking to fluent API samples is OK, but linking to infix API is not, right?
If that's the case, could it be that fluent API is on Dokka's classpath during analysis, but infix API is not? For instance, maybe the Dokka plugin is applied for fluent, but not for infix, or there are some other transitive ways in which it happens?
r
atrium provides two apis. when creating the kdoc for the api-fluent, everything works as it should. the api-fluent commonMain points to the samples in api-fluent commonTest and api-fluent -> jvmMain points to the samples in jvmTest in api-fluent. All good. in api-infix, we have the same commonMain points to commonTest of api-infix and jvmMain to jvmTest in api-infix. Here we have the problem. There is no error in all files in commonMain pointing to testMain in api-infix and it also works for all files in jvmMain pointing to jvmTest with the expectation of the above file where it also doesn't fail for all methods but only a few. I repeat the links here: jvmMain in api-infix -> toBe(aRegularFile): https://github.com/robstoll/atrium/blob/main/apis/infix-en_GB/atrium-api-infix-en_[…]in/kotlin/ch/tutteli/atrium/api/infix/en_GB/pathExpectations.kt#L334 points to sample in jvmTest api-infix: https://github.com/robstoll/atrium/blob/7f01629c3eab3357af91e43e83fcfd1819188d36/a[…]utteli/atrium/api/infix/en_GB/samples/PathExpectationSamples.kt No error for toStartWith in the same file: https://github.com/robstoll/atrium/blob/main/apis/infix-en_GB/atrium-api-infix-en_[…]in/kotlin/ch/tutteli/atrium/api/infix/en_GB/pathExpectations.kt#L20 pointing to the same sample file, just another method
@Ignat Beresnev shall I file a bug and if yes, in youtrack or on github?
i
Thanks for submitting the issue! I was not able to understand what the problem was in the short time that I had, so we'll need to dive deeper 😞 Something is likely messed up in the source set configuration/analysis