bazeltools / bazel-deps

Generate bazel dependencies for maven artifacts
MIT License
249 stars 121 forks source link

Use resolved parent for resolving children in normalizer #381

Open kmate-ct opened 5 months ago

kmate-ct commented 5 months ago

A potential solution to #379 by not allowing an evicted version to have effect on selecting a version of its children.

kmate-ct commented 5 months ago

If we think this is a good addition, I'm willing to add some unit tests!

kmate-ct commented 5 months ago

Update: we consider to change to maven_install from rules_jvm_external for multiple reasons later. I'd need to put this work on hold until we figure that out, as my resources are currently very limited towards this project. Still the patch should work and give the same resolution as using maven_install with pinned version conflict resolution, so whoever needs it could use this version. If I can get more resources to it, I'll return to it, but I cannot guarantee that unfortunately at this time.

johnynek commented 5 months ago

Thanks for the update.

BTW: maven_install seems like a good choice. I think the main benefit of Bazel-deps is that it has better scala support. For scala you don't want to run ijar in libraries that have macros or they will fail.

If you don't use scala or leverage any of the customization that Bazel-deps offers I think maven_install could be a fine choice.

kmate-ct commented 5 months ago

As far as I know maven_install doesn't use ijar anymore but their own simplified import rule, exactly because Scala macros and some issues with Kotlin as well. But yeah, it'd be great to make maven_install use scala_import and version the artifacts automatically, but based on the conversations I've seen I don't see much willingness to go to that direction.

kmate-ct commented 3 months ago

Update: for now we went with maven_install, which means that I won't be able to do any more progress on this PR in the foreseeable future. (We missed some of the Scala specifics that bazel-deps has but managed to work around those for ourselves for now.)