Bump kotlin 2.2 - #1555
Open
Flórián Garaba (fgaraba) wants to merge 2 commits into
Open
Conversation
Flórián Garaba (fgaraba)
requested review from
Vladislav Rassokhin (VladRassokhin) and
Robert Novotny (novotnyr)
July 23, 2026 10:23
| import kotlinx.metadata.jvm.Metadata | ||
| import kotlinx.metadata.jvm.signature | ||
| import org.objectweb.asm.tree.AnnotationNode | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
This file is the only "non-mechanic" change in this PR, this should warrant a more thorough review.
It's necessary in order to make the test case pass (we test classes that are compiled by the project's kotlin compiler, so bumping the compiler version changes the test subject itself).
This may be a bit close coupling though, if you say so I can split it into a separate PR.
Vladislav Rassokhin (VladRassokhin)
approved these changes
Jul 24, 2026
Flórián Garaba (fgaraba)
marked this pull request as ready for review
July 31, 2026 06:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
com.jetbrains.intellij.platform:plugin-system-parser-impl(compiled with Kotlin 2.4 metadata), which is being added to thestructure-intellijversion catalog as groundwork for a future parser migration, as well as some other issues (MP-7810 Correctly handle 403 error from Marketplace in verifier service)KotlinMethods.isKotlinDefaultMethod()with a semantically correct check against@kotlin.Metadata(viakotlinx-metadata-jvm). The old approach pattern-matched a specificINVOKESTATIC → $DefaultImplsinstruction sequence that the Kotlin 2.x compiler no longer emits when-Xjvm-default=all-compatibilityis active — causing thecheck that all internal API violating usages are foundtest to report four false-positiveNoInternalTypeUsagefindings after the compiler bump. The new approach asks whether the method appears in the class's own declared functions list in Kotlin metadata; if it doesn't, the compiler synthesized it - regardless of which lowering strategy produced the bytecode.apiVersion/languageVersionin the five verifier-test fixture modules (mock-plugin,before-idea,after-idea,additional-before-idea,additional-after-idea) independently from the project's own language level, so the fixture bytecode shape doesn't drift with future toolchain bumps.Mechanical fixes required by the version bump
ide-diff-builder: updatedkotlinx-serialization-runtime:1.0-M1-1.4.0-rc(incompatible with the 2.4.x plugin) tokotlinx-serialization-json:1.11.0; removed deadimport kotlinx.serialization.stringify.plugins-verifier-service ValueType<T>: added: Anyupper bound — Kotlin 2.2 promotes to an error the case where a Kotlin class with a nullableToverrides a Java generic member that expects non-nullT.KtClassResolver: replacedcache.get(key) { nullable }(rejected under Kotlin 2.2's stricter Caffeine overload resolution) withgetIfPresent+ conditionalput.CachingPluginDependencyResolverProvider: replacedcache.put(this.pluginId, r)(String?) withcache.put(this.id, r)(String).toLowerCase()/toUpperCase()calls replaced withlowercase()/uppercase()(three files).