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

2.14.0-rc2 does not work with Kotlin 1.4 (requires 1.6) #586

Closed
Spikhalskiy opened this issue Oct 13, 2022 · 7 comments · Fixed by #592
Closed

2.14.0-rc2 does not work with Kotlin 1.4 (requires 1.6) #586

Spikhalskiy opened this issue Oct 13, 2022 · 7 comments · Fixed by #592
Labels
bug pr-welcome Issue for which progress most likely if someone submits a Pull Request
Milestone

Comments

@Spikhalskiy
Copy link
Contributor

Spikhalskiy commented Oct 13, 2022

Describe the bug
An attempt to upgrade to 2.14.0-rc2 on Korlin 1.4 projects leads to

Class 'com.fasterxml.jackson.module.kotlin.KotlinModule' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.2.
The class is loaded from /Users/dmitry/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-kotlin/2.14.0-rc2/7b15044bd52050d15cdacec821b3571689f9cc4f/jackson-module-kotlin-2.14.0-rc2.jar!/com/fasterxml/jackson/module/kotlin/KotlinModule.class

Expected behavior
Kotlin 1.4 should be supported if possible to be compatible with Jackson 2.13.

Versions
Kotlin:
Jackson-module-kotlin: 2.14.0-rc2
Jackson-databind: 2.14.0-rc2

@cowtowncoder cowtowncoder changed the title 2.14.0-rc2 requires min Kotlin 1.6 2.14.0-rc2 does not work with Kotlin 1.4 (requires 1.6) Oct 13, 2022
@cowtowncoder
Copy link
Member

I would definitely need help here to figure out if and how it'd be possible to compile module to work with Kotlin 1.4. Assuming that is what we claim to support -- I don't know what the intended version range is at this point.

@Spikhalskiy
Copy link
Contributor Author

We do support [1.4,) in 2.13 and we probably should keep it until there is a strong specific reason why is it time to move on.

@cowtowncoder cowtowncoder added the pr-welcome Issue for which progress most likely if someone submits a Pull Request label Oct 13, 2022
@cowtowncoder
Copy link
Member

cowtowncoder commented Oct 14, 2022

@Spikhalskiy forgot to add one obvious aspect: for any given minor version we definitely should keep supported kotlin-core versions the same. So if and when 2.13.0 started with support for given versions (minus bugs), then all 2.13.x should do the same.

I finally went ahead and did #565 to make it simpler to verify compatibility (or lack thereof) for branches as well as PRs.

It does not actually guard against the issue reported here, I am guessing -- for that we need bit different job, which builds and installs artifact, then tries to run something against it? -- but should help avoid some of compatibility problems.

@cowtowncoder
Copy link
Member

@Spikhalskiy Back to the original problem: aside from tests not passing as module does not build against 1.4, does the error suggest that one would have to actually do Maven build for release artifact with Kotlin 1.4.x? That would not be good.

@cowtowncoder
Copy link
Member

At this point CI passes tests for Kotlin-core versions 1.5 through 1.7. I am planning to push one more Release Candidate for Jackson 2.14, 2.14.0-rc3. But soon it will be time for 2.14.0 final and unless someone can figure out a way to support 1.4, Jackson 2.14.0 will officially then require Kotlin 1.5.x as minimum.

This does not mean that further 2.14.x (or 2.15) could not support 1.4 but there will be less benefit: it may just make sense to leave 1.4 supported by earlier versions only.

I did add a small section on project README to indicate expected compatibility, with the ranges I assume are accurate for Jackson 2.13 and 2.14 as things are. Anyone with more information (or willing to test it out) feel free to send a PR to add more information.

@Spikhalskiy
Copy link
Contributor Author

2.14.x was reverted to use 1.5 Kotlin as it was used before in 2.13.x, which means the released artifact will still be binary compatible with Kotlin 1.4.

@cowtowncoder
Copy link
Member

I plan to do #593 as well which should verify compatibility as expected: build using whatever project defaults to (1.5.32) and only run tests against other kotlin-core versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pr-welcome Issue for which progress most likely if someone submits a Pull Request
Projects
None yet
2 participants