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

Bump the depended Jackson version to 2.15.3 #58

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Conversation

dmikurube
Copy link
Member

A fix in Jackson 2.15.3 is needed to enable this fix embulk/embulk-util-json#33 (comment)

FasterXML/jackson-core#1111

It's time to upgrade the depended Jackson to the latest!

@dmikurube dmikurube added this to the v0.4.0 milestone Oct 25, 2023
@dmikurube dmikurube requested a review from a team as a code owner October 25, 2023 05:31
Copy link

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

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

LGTM👍 Left minor comments.


final int minor = com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMinorVersion();
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getPatchLevel() <= 2)) {
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.15.3 or later.");
Copy link

@hiroyuki-sato hiroyuki-sato Oct 25, 2023

Choose a reason for hiding this comment

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

What do you think about adding databind in the log message?
I'm wondering that line 333 and here use the same error message.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Sounds reasonable. Fixed it like "embulk-util-config is not used with Jackson (jackson-databind) 2.15.3 or later."


final int minor = com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getMinorVersion();
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getPatchLevel() <= 2)) {
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.15.3 or later.");

Choose a reason for hiding this comment

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

ditto

Base automatically changed from bump-up-to-v0.4.0 to master October 26, 2023 01:13
@dmikurube
Copy link
Member Author

Thanks for your comments! Addressed them. Merging it!

@dmikurube dmikurube merged commit 0bb59ca into master Oct 26, 2023
2 checks passed
@dmikurube dmikurube deleted the jackson-2.15.3 branch October 26, 2023 06:55
Copy link

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

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

Sorry, I've missed point out another part. Please check for future development.


private static void assertJacksonDataBindVersion() {
if (com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMajorVersion() != 2) {
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.");

Choose a reason for hiding this comment

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

I've missed point out this part.

Please create another PR when this change useful.
embulk-util-config is not used with Jackson(jackson-databind) 2.

Copy link
Member Author

Choose a reason for hiding this comment

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

I basically don't think it's needed for this part.

Jackson 1 had different Java package names (org.codehaus.jackson.*) and Jackson 3 is going to have yet another Java package names (tools.jackson.*). While using Jackson 2 (com.fasterxml.jackson.*), the major version should be always 2.

This part is practically just an assertion. When it happens, that's not a simple problem anyway. ;)

Choose a reason for hiding this comment

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

I got it. Thanks! LGTM👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants