Skip to content
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

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

vmishenev
Copy link
Contributor

@vmishenev vmishenev commented Oct 18, 2023

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 (see fun 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.

@vmishenev vmishenev self-assigned this Oct 18, 2023
@vmishenev vmishenev linked an issue Oct 18, 2023 that may be closed by this pull request
@vmishenev vmishenev added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Oct 18, 2023
@vmishenev vmishenev marked this pull request as ready for review October 18, 2023 20:12
@vmishenev vmishenev marked this pull request as draft October 19, 2023 00:40
The tests, that have unresolved common symbols, are fixed by the new version of Analysis API.
@vmishenev vmishenev marked this pull request as ready for review October 19, 2023 19:00
@@ -125,30 +122,54 @@ class SinceKotlinTest : AbstractRenderingTest() {
val configuration = dokkaConfiguration {
sourceSets {
sourceSet {
sourceRoots = listOf("src/")
sourceRoots = listOf("src/jvm/")
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@IgnatBeresnev IgnatBeresnev left a 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 👍

@vmishenev vmishenev merged commit 3be4dd9 into master Oct 25, 2023
10 checks passed
@vmishenev vmishenev deleted the 3189-reorganize-project-model-for-MPP branch October 25, 2023 11:44
@IgnatBeresnev IgnatBeresnev added this to the Dokka 1.9.20 milestone Dec 21, 2023
@IgnatBeresnev IgnatBeresnev removed this from the Dokka 1.9.20 milestone Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[K2] Reorganize project model for MPP
3 participants