-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[K2] Reorganize project model for MPP #3236
Conversation
The tests, that have unresolved common symbols, are fixed by the new version of Analysis API.
@@ -125,30 +122,54 @@ class SinceKotlinTest : AbstractRenderingTest() { | |||
val configuration = dokkaConfiguration { | |||
sourceSets { | |||
sourceSet { | |||
sourceRoots = listOf("src/") | |||
sourceRoots = listOf("src/jvm/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -286,15 +285,15 @@ class LinkableContentTest : BaseAbstractTest() { | |||
sourceSets { | |||
sourceSet { | |||
analysisPlatform = "js" | |||
sourceRoots = listOf("jsMain", "commonMain", "jvmAndJsSecondCommonMain").map { | |||
sourceRoots = listOf("jsMain").map { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -60,15 +60,22 @@ class InheritorsTest : AbstractModelTest("/src/main/kotlin/inheritors/Test.kt", | |||
fun multiplatform() { | |||
val configuration = dokkaConfiguration { | |||
sourceSets { | |||
val commonSourceSet = sourceSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation and the comments, it made the review much easier 👍
We map Dokka's source set directly to a source module of Analysis API inside one Analysis Standalone session.
Analysis API session is created in
src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/KotlinAnalysis.kt
(seefun createAnalysisSession
)Before the PR, one Dokka's source set corresponded to one Standalone API session with one source module that has source roots from dependent source sets.
The PR allows the enabling of some tests annotated with
OnlyDescriptorsMPP
.Also, tests with
OnlyDescriptorsMPP
that have unresolved common symbols are fixed by the new version of Analysis API.