Skolson5903
06/23/2025, 9:59 PMapplyDefaultHierarchyTemplate()
so all the sourceSet names fit that template. Dokka produced a number of messages that surprised me, as if it doesn't understand the default hierarchy template. I posted the messages as a reply in this thread. Basically all the source sets that aren't leaf nodes in the default template are getting labeled as common. That seems to lead to it generating doc from appleMain into all the platforms, not just the Apple ones, etc. Is this expected behavior?Skolson5903
06/23/2025, 10:00 PM[:KmpIO] source set nativeMain has 1 dependents commonMain
[:KmpIO] Dokka could not determine KotlinPlatform for nativeMain from targets [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, metadata, metadata, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for nativeMain from targets [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, metadata, metadata, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for macosMain from targets [macosArm64, macosX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for macosMain from targets [macosArm64, macosX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for linuxMain from targets [linuxArm64, linuxX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for linuxMain from targets [linuxArm64, linuxX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for iosMain from targets [iosArm64, iosSimulatorArm64, iosX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for iosMain from targets [iosArm64, iosSimulatorArm64, iosX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for commonMain from targets [android, android, iosArm64, iosSimulatorArm64, iosX64, jvm, linuxArm64, linuxX64, macosArm64, macosX64, metadata, metadata, metadata, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [AndroidJVM, Native, JVM, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for commonMain from targets [android, android, iosArm64, iosSimulatorArm64, iosX64, jvm, linuxArm64, linuxX64, macosArm64, macosX64, metadata, metadata, metadata, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [AndroidJVM, Native, JVM, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for appleMain from targets [iosArm64, iosSimulatorArm64, iosX64, macosArm64, macosX64, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
[:KmpIO] Dokka could not determine KotlinPlatform for appleMain from targets [iosArm64, iosSimulatorArm64, iosX64, macosArm64, macosX64, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
This can be recreated with github repo Dokka V2 example repo for KMP.Oleg Yukhnevich
06/24/2025, 10:44 AMAdam Semenenko
06/24/2025, 10:56 AMAdam Semenenko
06/24/2025, 11:14 AMOleg Yukhnevich
06/24/2025, 11:25 AMlinuxMain
should be currently treated as common
in Dokka, but for me, the log message is a bit misleading, for example:
Dokka could not determine KotlinPlatform for linuxMain from targets [linuxArm64, linuxX64, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
or
Dokka could not determine KotlinPlatform for nativeMain from targets [iosArm64, iosSimulatorArm64, iosX64, linuxArm64, linuxX64, macosArm64, macosX64, metadata, metadata, metadata, metadata, metadata]. Dokka will assume this is a Common source set. (All platforms: [Native, Common])
It's hard to decipher what is metadata
and where they are coming from...
At my side, I would be very confused seeing such a message in logs (as was a topic-started). Maybe we can do something about it?Oleg Yukhnevich
06/24/2025, 11:26 AMThat seems to lead to it generating doc from appleMain into all the platforms, not just the Apple ones, etc.Coming back to the original question, could you expand on what you mean here? Maybe some specific example of what's going wrong?