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

Generation fails for expect declared in intermediate source set #3798

Closed
atyrin opened this issue Sep 11, 2024 · 2 comments · Fixed by #3875
Closed

Generation fails for expect declared in intermediate source set #3798

atyrin opened this issue Sep 11, 2024 · 2 comments · Fixed by #3875
Assignees
Labels
bug regression An issue/bug that appeared after recent changes
Milestone

Comments

@atyrin
Copy link
Contributor

atyrin commented Sep 11, 2024

Create a KMP project with jvm + linuxX64 + macosX64. And such code in source sets:

// nativeMain
expect fun shared()

// linuxX64Main, macosX64Main
actual fun shared(){}
Caused by: java.lang.IllegalArgumentException: Collection has more than one element.
	at kotlin.collections.CollectionsKt___CollectionsKt.single(_Collections.kt:605)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger.mergeExpectActual$analyzeExpectActual(DefaultDocumentableMerger.kt:119)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger.mergeExpectActual(DefaultDocumentableMerger.kt:136)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger.mergeWith(DefaultDocumentableMerger.kt:141)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger$invoke$1$3.invoke(DefaultDocumentableMerger.kt:35)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger$invoke$1$3.invoke(DefaultDocumentableMerger.kt:33)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger.merge(DefaultDocumentableMerger.kt:55)
	at org.jetbrains.dokka.transformers.documentation.DefaultDocumentableMerger.invoke(DefaultDocumentableMerger.kt:33)
	at org.jetbrains.dokka.base.generation.SingleModuleGeneration.mergeDocumentationModels(SingleModuleGeneration.kt:82)
	at org.jetbrains.dokka.base.generation.SingleModuleGeneration.generate(SingleModuleGeneration.kt:38)
	at org.jetbrains.dokka.DokkaGenerator$generate$1.invoke(DokkaGenerator.kt:34)
	at org.jetbrains.dokka.DokkaGenerator$generate$1.invoke(DokkaGenerator.kt:27)
	at org.jetbrains.dokka.DokkaGeneratorKt.timed(DokkaGenerator.kt:82)
	at org.jetbrains.dokka.DokkaGeneratorKt.access$timed(DokkaGenerator.kt:1)
	at org.jetbrains.dokka.DokkaGenerator.generate(DokkaGenerator.kt:27)
	at org.jetbrains.dokka.DokkaBootstrapImpl.generate(DokkaBootstrapImpl.kt:67)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.jetbrains.dokka.gradle.DelegatedInvocationHandler.invoke(automagicTypedProxy.kt:44)
	at jdk.proxy4/jdk.proxy4.$Proxy127.generate(Unknown Source)
	at org.jetbrains.dokka.gradle.AbstractDokkaTask$generateDocumentation$1$1.run(AbstractDokkaTask.kt:232)

Installation

  • Dokka version: 2.0.20-dev-357
  • DGPv1 / K1 or K2

dokka-repros.zip

@atyrin atyrin added the bug label Sep 11, 2024
@whyoleg
Copy link
Collaborator

whyoleg commented Sep 16, 2024

Most likely caused by the changes in #3662

@whyoleg whyoleg added the regression An issue/bug that appeared after recent changes label Sep 16, 2024
@whyoleg whyoleg added this to the Dokka 2.0.0 milestone Sep 18, 2024
martinbonnin added a commit to apollographql/apollo-kotlin that referenced this issue Oct 3, 2024
martinbonnin added a commit to apollographql/apollo-kotlin that referenced this issue Oct 4, 2024
* Use dokka2

* Workaround for Kotlin/dokka#3798

* Port fix for Gradle dependencies

* restore workaround
@ZacSweers
Copy link

Here is a repro case: slackhq/circuit#1732

@vmishenev vmishenev self-assigned this Oct 16, 2024
github-merge-queue bot pushed a commit to slackhq/circuit that referenced this issue Jan 2, 2025
Stuck on Kotlin/dokka#3798

`./gradlew :circuit-codegen-annotations:dokkaGenerateModuleHtml` to
repro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression An issue/bug that appeared after recent changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants