-
Notifications
You must be signed in to change notification settings - Fork 399
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
Bump Kotlin versions to 2.0.0-RC1 #3516
Conversation
IgnatBeresnev
commented
Mar 5, 2024
•
edited by whyoleg
Loading
edited by whyoleg
- Bumps KGP to 2.0.0-RC1
- Bumps kotlin-compiler to 2.0.0-RC1 (only K1)
# See: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin | ||
gradlePlugin-android = "4.2.2" | ||
gradlePlugin-android-dokkatoo = "8.0.2" | ||
gradlePlugin-android = "7.1.3" |
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.
gradlePlugin-android = "4.2.2"
gradlePlugin-android-dokkatoo = "8.0.2"
These are unused at the moment, so I've removed them (and the dependencies that depend on them) to reduce noise. Can be added once it's needed
gradlePlugin-android = "7.1.3"
KGP 2.0.0 now requires AGP 7.1.3+, so I had to bump it as well
gradle/libs.versions.toml
Outdated
gradlePlugin-gradle-customUserData = "1.12" | ||
gradlePlugin-gradle-enterprise = "3.14.1" |
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.
I think it makes sense to have the most important / frequently updated dependencies on the top, and it's unlikely that Gradle enterprise will be looked for / updated all that often. Just moved it closer to the end to reduce noise
kotlin-compiler-k2 = "2.0.0-dev-8561" | ||
|
||
# MUST match the version of the intellij platform used in the kotlin compiler, | ||
# otherwise this will lead to different versions of psi API and implementations | ||
# on the classpath and will fail with hard to debug problems in runtime. | ||
# See: https://github.com/JetBrains/kotlin/blob/e6633d3d9214402fcf3585ae8c24213a4761cc8b/gradle/versions.properties#L1 | ||
intellij-platform = "213.7172.25" | ||
intellij-platform = "213.7172.53" |
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.
IntelliJ platform was bumped in 2.0.0-Beta4
...le-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt
Outdated
Show resolved
Hide resolved
Some context on the The solution in #3147 uses an internal property from KGP with In KGP <= 1.9.20 the type of this property is In KGP 2.0.0 the type of the property was changed to This property is accessed only if the version of KGP in the user project is <= 1.9.20. However, if we compile Dokka 2.0.0 against KGP 2.0.0 (in which
Because Dokka was compiled against This hack adds reflection access to the expected 1.9.20 property (String). The code for I've also added a project property |
c8a3481
to
2bc5644
Compare
...lassic/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/KotlinNativeDistributionAccessor.kt
Show resolved
Hide resolved
...le-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidAutoConfigurationTest.kt
Outdated
Show resolved
Hide resolved
@@ -2,6 +2,6 @@ | |||
# Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | |||
# | |||
|
|||
dokka_it_kotlin_version=1.9.22 | |||
dokka_it_kotlin_version=2.0.0-Beta4 |
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.
BTW, why do we need to have this property here?
AFAIU we override this property (and dokka_it_android_gradle_plugin_version
) anyway when running integration tests via template.settings.gradle.kts
and so this value doesn't affect anything
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.
Good question, I have no idea :) We can try to remove it in a separate PR, see if the tests fail
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.
I believe the version is set as a default in IT projects, so if someone wants to open them in IJ and edit them, it's easier.
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.
But the version is used mostly in template.settings.gradle.kts
(with small exceptions), so to open the project in IDEA, you will still need to copy it inside project folder, or copy it's content
So, I would propose to remove this (in some future PR), if possible, to reduce amount of places where we need to update Kotlin version (or any other version), so that at some point we will not have some situation, that this version is not updated or not overridden in integration tests
dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt
Outdated
Show resolved
Hide resolved
The integration tests are failing with Execution failed for task ':commonizeNativeDistribution'.
> Could not resolve all files for configuration ':kotlinNativeBundleConfiguration'.
> Could not find org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.0-Beta4. At first I thought that it was an incompatible change in Kotlin / KGP (https://youtrack.jetbrains.com/issue/KT-64181), but after manually checking it, I realized it could be specific to our integration tests, and indeed this configuration might be causing the failure: dokka/dokka-integration-tests/gradle/projects/template.settings.gradle.kts Lines 102 to 130 in d9f1efe
@adam-enko could you please help here? It's a recent change from #3492, so hopefully it's still fresh in memory |
...-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt
Show resolved
Hide resolved
Sure thing, it's a simple fix. Explanation of the situation:
I mad a commit to just remove the |
46bb397
to
d59e193
Compare
* update Gradle in integration tests to 8.7
fe5f5b3
to
12246fe
Compare
...src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/DokkaResolutionFacade.kt
Show resolved
Hide resolved
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.
LGTM
How important is the failing SequentialTasksExecutionStressTest? |
Theoretically it could mean, that there is some kind of memory leak. But also, this could just mean, that more memory is needed. |
I've performed additional Here are some results: Note: each test duration was ±30 minutes at my side. Additionally this could mean two things:
For now, I don't have any proofs that we do have memory leak somewhere Dokka after some profiling (not just looking at memory graphs). Still, it's possible, as profiling Dokka execution in Gradle from multiple tasks is not that informative, as there is a lot of Gradle machinery involved under the hood... |
I agree. Just writing down what's on my mind, I don't have any action planned.: This performance test also makes the CI tests slower, it shouldn't need to be run every time (e.g. scheduling it to be once a day should be fine), and it makes the CI tests much more sensitive to limited resources (I suspect without the performance test we could probably just run all of the tests on one machine, without limiting parallelism or needing to batch the tests. I think it'd make sense to create a separate subproject for profiling tests. |