-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update Kotlin to 1.7.20-RC #2682
Conversation
internal fun Project.compilationsOf(sourceSet: KotlinSourceSet): List<KotlinCompilation> { | ||
//KT-45412 Make sure .kotlinSourceSets and .allKotlinSourceSets include the default source set | ||
return allCompilationsOf(sourceSet).filter { compilation -> sourceSet in compilation.kotlinSourceSets || sourceSet == compilation.defaultSourceSet } | ||
} | ||
|
||
private fun KotlinMultiplatformExtension.allCompilationsOf(sourceSet: KotlinSourceSet): List<KotlinCompilation> { | ||
val allCompilations = targets.flatMap { target -> target.compilations } | ||
return allCompilations.filter { compilation -> sourceSet in compilation.allKotlinSourceSets || sourceSet == compilation.defaultSourceSet } |
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.
It failed with Overload resolution ambiguity
, so refactored it a bit
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (17, 51): Overload resolution ambiguity:
private fun [Error type: Type for error type constructor (KotlinSingleTargetExtension)].allCompilationsOf(sourceSet: KotlinSourceSet): List<org.jetbrains.dokka.gradle.kotlin.KotlinCompilation /* = org.jetbrains.kotlin.gradle.plugin.KotlinCompilation<KotlinCommonOptions> */> defined in org.jetbrains.dokka.gradle.kotlin in file kotlinCompilationUtils.kt
private fun KotlinMultiplatformExtension.allCompilationsOf(sourceSet: KotlinSourceSet): List<org.jetbrains.dokka.gradle.kotlin.KotlinCompilation /* = org.jetbrains.kotlin.gradle.plugin.KotlinCompilation<KotlinCommonOptions> */> defined in org.jetbrains.dokka.gradle.kotlin in file kotlinCompilationUtils.kt
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (18, 12): One type argument expected. Use 'KotlinSingleTargetExtension<*>' if you don't want to pass type arguments
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (25, 12): Overload resolution ambiguity:
private fun [Error type: Type for error type constructor (KotlinSingleTargetExtension)].allCompilationsOf(sourceSet: KotlinSourceSet): List<org.jetbrains.dokka.gradle.kotlin.KotlinCompilation /* = org.jetbrains.kotlin.gradle.plugin.KotlinCompilation<KotlinCommonOptions> */> defined in org.jetbrains.dokka.gradle.kotlin in file kotlinCompilationUtils.kt
internal fun Project.allCompilationsOf(sourceSet: KotlinSourceSet): List<org.jetbrains.dokka.gradle.kotlin.KotlinCompilation /* = org.jetbrains.kotlin.gradle.plugin.KotlinCompilation<KotlinCommonOptions> */> defined in org.jetbrains.dokka.gradle.kotlin in file kotlinCompilationUtils.kt
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (25, 50): Cannot infer a type for this parameter. Please specify it explicitly.
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (33, 13): One type argument expected for class KotlinSingleTargetExtension<TARGET : KotlinTarget>
e: /home/ignat/IdeaProjects/dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinCompilationUtils.kt: (34, 41): Cannot infer a type for this parameter. Please specify it explicitly
CommonAnalysisParameters( | ||
metadataPartProviderFactory = { content -> | ||
environment.createPackagePartProvider(content.moduleContentScope) | ||
} | ||
), |
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.
A new primary constructor arg has been added (doesn't look like we need it), so have to use named parameters
@@ -113,7 +113,7 @@ class GradleDokkaSourceSetBuilderTest { | |||
sourceSet.dependsOn(sourceSet.DokkaSourceSetID("s3")) | |||
sourceSet.dependsOn(GradleDokkaSourceSetBuilder("s4", project)) | |||
sourceSet.dependsOn(GradleDokkaSourceSetBuilder("s5", project).build()) | |||
sourceSet.dependsOn(DefaultKotlinSourceSet(project, "s6")) |
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.
Looks like there was some refactoring of gradle api, DefaultKotlinSourceSet
is now abstract, so cannot instantiate it directly.
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.
Can you update integration tests?
Oh yeah, indeed. I had a feeling I forgot to do something, that was it :) |
ead9d99
to
36e4be0
Compare
JFYI serialization and coroutine integration tests cannot be run with Kotlin 1.7.20 yet - there's native/npm compilation failures. So I didn't update them |
No description provided.