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

Update Kotlin to 1.7.20-RC #2682

Merged
merged 2 commits into from Sep 27, 2022
Merged

Update Kotlin to 1.7.20-RC #2682

merged 2 commits into from Sep 27, 2022

Conversation

IgnatBeresnev
Copy link
Member

No description provided.

Comment on lines -23 to -30
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 }
Copy link
Member Author

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

Comment on lines +365 to +369
CommonAnalysisParameters(
metadataPartProviderFactory = { content ->
environment.createPackagePartProvider(content.moduleContentScope)
}
),
Copy link
Member Author

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"))
Copy link
Member Author

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.

Copy link
Member

@vmishenev vmishenev left a 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?

@IgnatBeresnev
Copy link
Member Author

Can you update integration tests?

Oh yeah, indeed. I had a feeling I forgot to do something, that was it :)

@IgnatBeresnev
Copy link
Member Author

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

@IgnatBeresnev IgnatBeresnev merged commit a7750c6 into master Sep 27, 2022
@IgnatBeresnev IgnatBeresnev deleted the kotlin-1.7.20-RC branch September 27, 2022 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants