bazel-contrib / bazel-contrib/rules_jvm_external

Use maven_install.json in unpinned_maven when version conflict policy is pinned

Open
#512 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

The more I look into it, one of the biggest pitfalls of Bazel in JVM projects is the dependencies management.
While this project is awesome and does help with that a lot, a big monolith repo with a lot of maven dependencies is hard to maintain, even if I'm using the `maven_install.json` feature, every dependency change can take significant amount of time for updating the maven_json file (e.g. I'm currently working on a project with around 250 direct deps and it takes me around 10 min to update the json file).

When using `version_conflict_policy="pinned"` there is no actual reason to rebuild the entire tree, only the changed artifacts should be fetched and then we can build a new `maven_install.json` file based on it, would be nice to add this feature (by adding a flag I guess, not sure it should be the default behavior).
The only problem I can think of at the moment is version conflicts, if we'll pass to coursier only specific artifacts we'll not resolve conflicts, not 100% if we can solve it, maybe by writing a wrapper to coursier.

I'll be happy to try to figure it out and send a PR if this feature makes sense to you guys.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the pinned version_conflict_policy currently produces maven_install.json and how unpinned_maven invokes dependency resolution. Review the proposed interaction with Coursier and determine how conflicts should be handled when only changed artifacts are passed. Done means a clearly scoped approach for incremental updates that preserves pinned conflict behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.