bazel-contrib / bazel-contrib/rules_jvm_external

Transitive Conflicts do not appear in resolution prop

Open
#294 2 comments 0 reactions 0 assignees View on GitHub
coursier-cli type: bug
Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

## Expectation
When transitive dependencies have versions conflicts, I'd expect to at least see the re-mapping in the `conflict_resolution` json property, but I don't.

For example, given this `WORKSPACE`:

```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

RULES_JVM_EXTERNAL_TAG = "2.10"
RULES_JVM_EXTERNAL_SHA = "1bbf2e48d07686707dd85357e9a94da775e1dbd7c464272b3664283c9c716d26"

http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"com.google.cloud:google-cloud-storage:1.66.0",
"com.fasterxml.jackson.datatype:jackson-datatype-guava:2.10.1",
],
repositories = [
"https://repo1.maven.org/maven2",
],
maven_install_json = "//:maven_install.json",
strict_visibility = True
)
```

I'd expect `guava:20` (which jackson relies on) to be identified as being replaced with `guava:26.0-android`, but it doesn't.

## Environment
I've tried with `rules_jvm_external` versions `2.8`, `2.9`, and `2.10` with Bazel `1.1.0`

Contributor guide

Open the contributing guide

Research direction

Reproduce the WORKSPACE example with rules_jvm_external 2.8–2.10 and Bazel 1.1.0, focusing on maven_install and the generated maven_install.json. Trace how transitive dependency conflicts are represented in the conflict_resolution JSON property, then verify whether the guava:20 to guava:26.0-android remapping appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.