-
Notifications
You must be signed in to change notification settings - Fork 1.9k
KE2: Upgrade to Kotlin 2.1.0; restore basic type parameter and type argument extraction #18215
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
Changes from all commits
2cc2d93
784a63b
43576a1
448d368
504a630
44e44dc
53593a3
b60298d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,8 +19,8 @@ import kotlinx.coroutines.withContext | |
| import org.jetbrains.kotlin.analysis.api.KaAnalysisApiInternals | ||
| import org.jetbrains.kotlin.analysis.api.KaSession | ||
| import org.jetbrains.kotlin.analysis.api.analyze | ||
| import org.jetbrains.kotlin.analysis.api.platform.lifetime.KotlinAlwaysAccessibleLifetimeTokenProvider | ||
| import org.jetbrains.kotlin.analysis.api.platform.lifetime.KotlinLifetimeTokenProvider | ||
| import org.jetbrains.kotlin.analysis.api.platform.lifetime.KotlinAlwaysAccessibleLifetimeTokenFactory | ||
| import org.jetbrains.kotlin.analysis.api.platform.lifetime.KotlinLifetimeTokenFactory | ||
| import org.jetbrains.kotlin.analysis.api.projectStructure.KaSourceModule | ||
| import org.jetbrains.kotlin.analysis.api.standalone.buildStandaloneAnalysisAPISession | ||
| import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtLibraryModule | ||
|
|
@@ -166,6 +166,7 @@ OLD: KE1 | |
| ) | ||
| dtw.flush() | ||
| loggerBase.close() | ||
| System.exit(0) // TODO: figure out what's keeping the JVM awake | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed a ticket for this here: https://youtrack.jetbrains.com/issue/KT-73753/Analysis-API-doesnt-terminate
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to include the context at #18215 (comment) identifying thread-pool cleanup as the cause |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -187,7 +188,7 @@ private fun doAnalysis( | |
| val ourLanguageVersionSettings = k2args.toLanguageVersionSettings(MessageCollector.NONE) | ||
|
|
||
| val session = buildStandaloneAnalysisAPISession { | ||
| registerProjectService(KotlinLifetimeTokenProvider::class.java, KotlinAlwaysAccessibleLifetimeTokenProvider()) | ||
| registerProjectService(KotlinLifetimeTokenFactory::class.java, KotlinAlwaysAccessibleLifetimeTokenFactory()) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed in Kotlin 2.1.0 |
||
|
|
||
| // TODO: Is there a better way we can do all this directly from k2args? | ||
|
|
||
|
|
||
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 would be worth adding a comment like
so we don't upgrade to the latest version without thinking.
Depending on what happens with https://youtrack.jetbrains.com/issue/KT-73751/Analysis-API-Caffeine-dependency we might be able to do better here in the future.