temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
200 stars 134 forks source link

Try builder first, then fallback to deprecated constructor #2072

Open Sineaggi opened 1 month ago

Sineaggi commented 1 month ago

What was changed

Tries the new kotlin jackson module builder first, then falls back to the deprecated constructor.

Why?

Newest jackson (2.17.0) broke abi.

Checklist

  1. Closes #2071

  2. How was this tested: Tested the code manually against jackson 2.11, 2.14 and 2.17.

  3. Any docs updates needed?

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

Sineaggi commented 1 month ago

The upstream issue has a fix here https://github.com/FasterXML/jackson-module-kotlin/pull/799 but using the builder would have avoided this issue.

Sineaggi commented 1 month ago

There is another way to simplify this further, and that is to call the registerKotlinModule function instead of trying to register a KotlinModule ourselves.

Quinn-With-Two-Ns commented 1 month ago

Ah CI is failing because your branch does not have tags , which our CI unfortunately makes use of to detect the version of the SDK, you can use git fetch --tags and then you can push you branch with tags. Sorry for the inconvenience.

Sineaggi commented 1 month ago

Ah CI is failing because your branch does not have tags

Right, that happened during local testing as well. I've pushed tags now.