jackson-module-kotlin icon indicating copy to clipboard operation
jackson-module-kotlin copied to clipboard

Test against previous versions of Kotlin API to ensure backwards compatibility

Open JLLeitschuh opened this issue 3 years ago • 7 comments

Closes #523

Finally, to have your code merged you will have to fill out the Contributor License Agreement and email a scan/photo of the result to info at fasterxml dot com.

I believe I already did this for a previous contribution a few years ago.

JLLeitschuh avatar Jan 03 '22 23:01 JLLeitschuh

Ok this is up to Kotlin module maintainers, but just quick question: would it be possible to add bit more description on usage? It sounds like this would add compatibility tests to run using Gradle(wrapper), invoked from Github actions. That sounds great, I just want to make sure it's clear what's in there and how it can/is used.

On CLA; what id would have been used? I should be able to find it, just didn't find email.

cowtowncoder avatar Jan 04 '22 22:01 cowtowncoder

Just looked through my PR history, it seems this is my first time contributing to the FasterXML project. I'll do the CLA

JLLeitschuh avatar Jan 05 '22 16:01 JLLeitschuh

Giving this a looksee today…

dinomite avatar Jan 06 '22 17:01 dinomite

There are two tests that fail when I run it with Gradle, both seem to be to do with singletons. I don't know how to fix this. I don't even really fully understand the problem other than there seem to be two instances of Unit when running with API compatibility with Kotlin 1.3:

com.fasterxml.jackson.module.kotlin.test.github.TestGithub196 > testUnitSingletonDeserialization FAILED
    java.lang.AssertionError at Github196.kt:14

com.fasterxml.jackson.module.kotlin.test.github.failing.TestGithub518 > deserializeEmptyObjectToSingletonUnit FAILED
    java.lang.AssertionError at Github518.kt:23

If you'd like to see the build failure, here's a link to the Gradle build scan: https://scans.gradle.com/s/4v5r7s5wpb7f6

Also, I see the following failure from maven and I don't know how to fix it.

Error:  Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp (default) on project jackson-module-kotlin: There is at least one incompatibility: com.fasterxml.jackson.module.kotlin.KotlinDeserializers_1_5:METHOD_ABSTRACT_ADDED_IN_IMPLEMENTED_INTERFACE -> [Help 1]

JLLeitschuh avatar Jan 06 '22 21:01 JLLeitschuh

@JLLeitschuh I'll do a merge from 2.14 and give those failures a look

dinomite avatar Jan 07 '22 17:01 dinomite

Looks like this is working. That failure is because of #535, a bug in the Kotlin compiler that is fixed in Kotlin 1.6+. We could revert the change I made in 5e5773dd to make j-m-k 2.14 compatible with Kotlin < 1.6

dinomite avatar Jan 08 '22 19:01 dinomite

@dinomite I fixed the failure you indicated, but I'm still seeing the following tests failing:

com.fasterxml.jackson.module.kotlin.test.github.TestGithub196 > testUnitSingletonDeserialization FAILED
    java.lang.AssertionError at Github196.kt:14

com.fasterxml.jackson.module.kotlin.test.github.failing.TestGithub518 > deserializeEmptyObjectToSingletonUnit FAILED
    java.lang.AssertionError at Github518.kt:23

JLLeitschuh avatar Jan 10 '22 16:01 JLLeitschuh

Backward compatibility checks have already been addressed by the policy of using the oldest Kotlin version that has not been deprecated. Compatibility checks with newer Kotlin versions have already been checked by CI.

Therefore, this PR is closed.

k163377 avatar Dec 09 '23 11:12 k163377