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

Fix Module was compiled with an incompatible version of Kotlin #2795

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

simonbasle
Copy link
Member

While upgrading to Gradle 7.2, the version of the Kotlin gradle plugin
was also upgraded to 1.5.31 to ensure plugin compatibility.

What was overlooked is that this means an upgrade of the Kotlin language
level, which is undesirable in a patch release.

This is made visible in donwstream projects still relying on Kotlin 1.3
with the following message for instance:

Module was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 1.5.1, expected version is 1.1.16.

This commit fixes the situation by enforcing Kotlin version 1.3 for both
apiVersion and languageVersion. It results in metadata at version
1.1.18, but local tests show that it should this time be compatible with
expected version 1.1.16.

Fixes #2793.

While upgrading to Gradle 7.2, the version of the Kotlin gradle plugin
was also upgraded to 1.5.31 to ensure plugin compatibility.

What was overlooked is that this means an upgrade of the Kotlin language
level, which is undesirable in a patch release.

This is made visible in donwstream projects still relying on Kotlin 1.3
with the following message for instance:

```
Module was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 1.5.1, expected version is 1.1.16.
```

This commit fixes the situation by enforcing Kotlin version 1.3 for both
`apiVersion` and `languageVersion`. It results in metadata at version
1.1.18, but local tests show that it should this time be compatible with
expected version 1.1.16.

Fixes #2793.
@simonbasle simonbasle requested a review from a team as a code owner September 28, 2021 11:14
@simonbasle simonbasle added this to the 3.3.21.RELEASE milestone Sep 28, 2021
@simonbasle simonbasle added type/bug A general bug type/chores A task not related to code (build, formatting, process, ...) labels Sep 28, 2021
@simonbasle simonbasle self-assigned this Sep 28, 2021
@simonbasle simonbasle requested a review from a team September 28, 2021 11:14
@simonbasle simonbasle linked an issue Sep 28, 2021 that may be closed by this pull request
Copy link
Contributor

@OlegDokuka OlegDokuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonbasle simonbasle merged commit 15b9825 into 3.3.x Oct 1, 2021
@reactorbot
Copy link

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

@simonbasle simonbasle deleted the 2793-revertKotlinBump branch October 1, 2021 15:32
simonbasle added a commit that referenced this pull request Oct 1, 2021
@simonbasle simonbasle modified the milestones: 3.3.21.RELEASE, 3.4.11 Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug type/chores A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module was compiled with an incompatible version of Kotlin
3 participants