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

Remove jackson-module-kotlin as a required dependency #1722

Closed
sambsnyd opened this issue Apr 26, 2022 · 4 comments
Closed

Remove jackson-module-kotlin as a required dependency #1722

sambsnyd opened this issue Apr 26, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sambsnyd
Copy link
Member

We want to support the serialization and deserialization of kotlin recipes.
We do not want rewrite to have an opinion about which version of kotlin its consumers use, if they use kotlin at all.

So we shall remove our dependency on jackson-module-kotlin and use reflection to apply it at runtime if it is present. Build plugins will be correspondingly updated to include jackson-module-kotlin by default, so users will have to make no changes.

@sambsnyd sambsnyd added the enhancement New feature or request label Apr 26, 2022
@sambsnyd sambsnyd added this to the 7.22.0 milestone Apr 26, 2022
@sambsnyd sambsnyd self-assigned this Apr 26, 2022
@nmck257
Copy link
Collaborator

nmck257 commented Mar 14, 2023

Unfortunately, jackson-module-kotlin itself has an opinion about kotlin version. The latest jackson-module-kotlin has a compile dependency on kotlin-reflect:1.5.30, which transitively pulls in kotlin-stdlib:1.5.30, whereas latest Kotlin is currently 1.8.10.

There might be a fix on the Jackson side: FasterXML/jackson-module-kotlin#566 (comment)
...but in the interim:

This effectively pins recipes run via Maven plugin (haven't checked Gradle) to Kotlin 1.5.30. I wonder if it might be better to 1) dependency-manage kotlin-bom in the maven plugin, assuming that a pinned current version is better than a pinned stale version 2) remove jackson-module-kotlin from the plugin and move that dependency declaration responsibility to kotlin recipe authors 3) idk ?

@cowtowncoder
Copy link

Aside from the issue on Jackson-module-kotlin side which hopefully gets addressed, module itself does work against kotlin-core versions 1.4 - 1.8, doesn't it? At least that is my understanding, based on CI checking against different versions of kotlin-core.

@nmck257
Copy link
Collaborator

nmck257 commented Mar 14, 2023

I'm not aware of any compatibility issues between the code of jackson-module-kotlin and newer versions of the Kotlin APIs, and anecdotally, I haven't experienced issues with apps which bring a newer Kotlin version + jackson-module-kotlin.

@cowtowncoder
Copy link

@nmck257 Ok yes that is my understanding as well. The issue linked-to needs to be resolved regardless, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants