Skip to content

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Oct 20, 2025

What changes were proposed in this pull request?

Currently, it's relatively complicated with dependency version management due to the different resolution mechanisms between Maven and SBT.

Take Jackson deps as an example, to ensure all Jackson deps have the same version on the classpath, for both Maven and SBT, we must exclude all transitive Jackson deps and re-declare them manually, otherwise SBT may pick the higher version from transitive deps then breaks the building.

This PR proposes to use BOM to simplify the above process, see technical details at https://github.com/FasterXML/jackson-bom

Maven has built-in support for BOM, SBT also has a plugin https://github.com/heremaps/here-sbt-bom

Why are the changes needed?

Simplify dependency management.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass GHA.

Manually checked the output of build/sbt dependencyTree, all Jackson deps are correctly resolved to the expected version - 2.19.2.

Was this patch authored or co-authored using generative AI tooling?

No.

<scalafmt.validateOnly>true</scalafmt.validateOnly>
<scalafmt.changedOnly>true</scalafmt.changedOnly>
<fasterxml.jackson.version>2.19.2</fasterxml.jackson.version>
<fasterxml.jackson.databind.version>2.19.2</fasterxml.jackson.databind.version>
Copy link
Member Author

Choose a reason for hiding this comment

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

in case that jackson-databind has a standalone patched version, the jackson-bom also has a new release, for example

https://mvnrepository.com/artifact/com.fasterxml.jackson/jackson-bom/2.13.4.20221013

@pan3793
Copy link
Member Author

pan3793 commented Oct 20, 2025

I hit some Jackson deps issues (#52664 (comment)) in upgrading Avro to 1.12.1, and haven't figured out the root cause, so I am looking into this new simple approach to address the issues.

cc @LuciferYang @sarutak @dongjoon-hyun WDYT?

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Could you revert all elimination of <exclusion> tags from this PR?

I believe this PR should work without touching the existing exclusion rules in order to verify that BOM is actually working correctly, @pan3793 .

@pan3793
Copy link
Member Author

pan3793 commented Oct 21, 2025

@dongjoon-hyun, either w/ or w/o the elimination of <exclusion> should work, I tend to eliminate them to simplify the pom.xml, but also fine if you think we should keep them.

@pan3793 pan3793 requested a review from dongjoon-hyun October 21, 2025 05:32
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you for revising this PR, @pan3793 .

Merged to master for Apache Spark 4.1.0-preview3.

Copy link
Member

@sarutak sarutak left a comment

Choose a reason for hiding this comment

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

Late LGTM.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants