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

Verify compatibility with K2 mode for Kotlin-dependent plugins #1150

Merged
merged 16 commits into from
Sep 18, 2024

Conversation

novotnyr
Copy link
Collaborator

@novotnyr novotnyr commented Sep 11, 2024

Plugin that depends on the Kotlin plugin and does not declare compatibility will emit a Compatibility Problem.

  • Introduce a KotlinPluginMode property in plugins that indicates the K1/K2 compatibility level. Use Implicit for missing value in existing plugins. Use Invalid for plugins that declare no compatibility with both K1 and K2 compatibility levels.
  • Introduce an UndeclaredKotlinK2CompatibilityMode plugin problem with Warning level for any plugin. The actual plugin problem severity depends on the Platform version:
    • in Platform 2024.2.1 and newer, this is a CompatibilityProblem reported by the Plugin Verifier. More specifically, it is an instance of UndeclaredKotlinK2CompatibilityModeProblem in the Plugin Verifier.
    • in older Platform versions, this problem is ignored.
  • The problem level is remapped in the Plugin Verifier in the KotlinCompatibilityModeProblemResolver class. The structure library is unaware of the IDE version, hence the decision is deferred to the Plugin Verifier.
  • KotlinCompatibilityModeProblemResolver will remove all instances of UndeclaredKotlinK2CompatibilityMode plugin structure warnings after remapping, as not to cause duplicate compatibility problems.
  • Introduce an InvalidKotlinPluginMode plugin problem with Error level for any plugin. This happens when both supportsK1 and supportsK2 are set to false.

See MP-6825

@novotnyr novotnyr changed the title Mp 6825 declare compatibility with k2 mode Verify compatibility with K2 mode for Kotlin-dependent plugins Sep 11, 2024
@novotnyr novotnyr force-pushed the mp-6825-declare-compatibility-with-k2-mode branch from 470e660 to 42952c2 Compare September 18, 2024 07:58
@novotnyr novotnyr merged commit a7bcb5c into master Sep 18, 2024
6 checks passed
@novotnyr novotnyr deleted the mp-6825-declare-compatibility-with-k2-mode branch September 18, 2024 08:23
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.

3 participants