question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`versionReconciliation` ignores `dependencyOverrides`

See original GitHub issue

Expected Behavior

versionReconciliation should not issue an error for artifact versions forced by dependencyOverrides

Current Behavior

When using versionReconciliation in a sbt build (either with sbt-coursier or sbt-lm-coursier), coursier will issue a conflict error even though the conflicting dependency version is forced by dependencyOverrides.

See the following sbt session (tested in one of Scio’s submodules:

sbt:scio-bigquery> show versionReconciliation
[info] * io.grpc:grpc-stub:strict

sbt:scio-bigquery> show dependencyOverrides
[info] * io.grpc:grpc-core:1.17.1
[info] * io.grpc:grpc-context:1.17.1
[info] * io.grpc:grpc-auth:1.17.1
[info] * io.grpc:grpc-netty:1.17.1
[info] * io.grpc:grpc-stub:1.17.1
[info] * com.google.guava:guava:25.1-jre
[info] * com.google.api:gax:1.38.0
[info] * com.google.api:gax-grpc:1.38.0

sbt:scio-bigquery> update
[error] stack trace is suppressed; run last scio-core / coursierResolutions for the full output
[error] (scio-core / coursierResolutions) coursier.error.conflict.StrictRule: Rule Strict(Set(ModuleMatcher(io.grpc:grpc-stub)),Set(),false,true,false) not satisfied: coursier.params.rule.Strict$EvictedDependencies: Unsatisfied rule Strict(io.grpc:grpc-stub): Found evicted dependencies:
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
[error]    └─ com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
[error]    └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]       └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.10.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-common-protos:1.12.0
[error]    β”œβ”€ com.google.cloud:google-cloud-spanner:1.6.0
[error]    β”‚  └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]    β”‚     └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud:google-cloud-bigtable:0.73.0-alpha
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]    └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]       └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.44.0
[error]    └─ com.google.cloud:google-cloud-bigquerystorage:0.79.0-alpha
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:0.38.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-bigtable-v2:0.38.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.43.0
[error]    └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]       └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-cloud-spanner-v1:1.6.0
[error]    └─ com.google.cloud:google-cloud-spanner:1.6.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.10.1 wanted)
[error] └─ com.google.api.grpc:grpc-google-common-protos:1.12.0
[error]    β”œβ”€ com.google.cloud:google-cloud-spanner:1.6.0
[error]    β”‚  └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]    β”‚     └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud:google-cloud-bigtable:0.73.0-alpha
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud:google-cloud-bigtable-admin:0.73.0-alpha
[error]    └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]       └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]          └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0
[error]
[error] io.grpc:grpc-stub:1.17.1 (1.16.1 wanted)
[error] └─ com.google.cloud.bigtable:bigtable-client-core:1.8.0
[error]    └─ org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.18.0
[error]       └─ org.apache.beam:beam-runners-google-cloud-dataflow-java:2.18.0

Context

  • sbt 1.3.7
  • sbt-lm-coursier or sbt-coursier version 2.0.0-RC5-3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jtocommented, May 29, 2020

Hey! Thanks for looking into this πŸ˜ƒ

I can reproduce it with the following example:

scalaVersion := "2.12.11"
libraryDependencies ++= Seq(
  "com.spotify" %% "scio-core" % "0.8.4"
)
versionReconciliation += "io.grpc" % "grpc-stub" % "strict" //OK if commented, fails otherwise.

dependencyOverrides += "io.grpc" % "grpc-stub" % "1.17.1"
0reactions
alexarchambaultcommented, Jun 16, 2020

Closing this, this should be fixed in the upcoming 2.0.0-RC6-6, via https://github.com/coursier/sbt-coursier/pull/244.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better management of transitive dependencies and conflicts
It ignores the lowest versions and version intervals, until they can be reconciled with the same algorithm as "default" . Since reconciliationΒ ...
Read more >
dependencyOverrides ignored Β· Issue #95 Β· rtimush/sbt-updates
I specify version ranges in my dependencies, then use sbt-lock to generate lock.sbt files. Those define a dependencyOverrides setting withΒ ...
Read more >
How to force a specific version of dependency? - Stack Overflow
For binary compatible conflicts, sbt provides dependency overrides. They are configured with the dependencyOverrides setting, which is a set of ModuleIDs.
Read more >
coursier/coursier - Gitter
We explicitly depend on protobuf 2.6.1, but it seems that a library that depends on protobuf 3.0 is causing coursier to ignore the...
Read more >
Scala Center updates Q3 2019 Advisory Board meeting
versionReconciliation += "org.typelevel" %% "cats-core" % "semver" ... on optimized dependency sets during resolution (allowing to ignore.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found