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.

Coursier evicts wrong version

See original GitHub issue

The coursier plugin evicts different versions that sbt. It should evict the same version.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nigredo-toricommented, Nov 8, 2017

Here’s a small test case for this bug (or a similar one).

project/plugins.sbt:

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC13")

build.sbt:

libraryDependencies ++= Seq(
  "org.typelevel" %% "cats-core" % "1.0.0-RC1",
  "com.kailuowang" %% "mainecoon-core" % "0.4.0"
)

Then coursierDependencyTree produces the following:

coursier_test (configurations compile, compile-internal, optional, provided, runtime, runtime-internal, test, test-internal)
β”œβ”€ com.kailuowang:mainecoon-core_2.12:0.4.0
β”‚  β”œβ”€ org.scala-lang:scala-library:2.12.3 -> 2.12.4
β”‚  └─ org.typelevel:cats-core_2.12:1.0.0-MF
β”‚     β”œβ”€ org.scala-lang:scala-library:2.12.2 -> 2.12.4
β”‚     β”œβ”€ org.typelevel:cats-kernel_2.12:1.0.0-MF
β”‚     β”‚  └─ org.scala-lang:scala-library:2.12.2 -> 2.12.4
β”‚     β”œβ”€ org.typelevel:cats-macros_2.12:1.0.0-MF
β”‚     β”‚  β”œβ”€ org.scala-lang:scala-library:2.12.2 -> 2.12.4
β”‚     β”‚  └─ org.typelevel:machinist_2.12:0.6.1 -> 0.6.2
β”‚     β”‚     β”œβ”€ org.scala-lang:scala-library:2.12.0 -> 2.12.4
β”‚     β”‚     └─ org.scala-lang:scala-reflect:2.12.0 -> 2.12.4
β”‚     β”‚        └─ org.scala-lang:scala-library:2.12.4
β”‚     └─ org.typelevel:machinist_2.12:0.6.1 -> 0.6.2
β”‚        β”œβ”€ org.scala-lang:scala-library:2.12.0 -> 2.12.4
β”‚        └─ org.scala-lang:scala-reflect:2.12.0 -> 2.12.4
β”‚           └─ org.scala-lang:scala-library:2.12.4
β”œβ”€ org.scala-lang:scala-library:2.12.4
└─ org.typelevel:cats-core_2.12:1.0.0-RC1 -> 1.0.0-MF
   β”œβ”€ org.scala-lang:scala-library:2.12.2 -> 2.12.4
   β”œβ”€ org.typelevel:cats-kernel_2.12:1.0.0-MF
   β”‚  └─ org.scala-lang:scala-library:2.12.2 -> 2.12.4
   β”œβ”€ org.typelevel:cats-macros_2.12:1.0.0-MF
   β”‚  β”œβ”€ org.scala-lang:scala-library:2.12.2 -> 2.12.4
   β”‚  └─ org.typelevel:machinist_2.12:0.6.1 -> 0.6.2
   β”‚     β”œβ”€ org.scala-lang:scala-library:2.12.0 -> 2.12.4
   β”‚     └─ org.scala-lang:scala-reflect:2.12.0 -> 2.12.4
   β”‚        └─ org.scala-lang:scala-library:2.12.4
   └─ org.typelevel:machinist_2.12:0.6.1 -> 0.6.2
      β”œβ”€ org.scala-lang:scala-library:2.12.0 -> 2.12.4
      └─ org.scala-lang:scala-reflect:2.12.0 -> 2.12.4
         └─ org.scala-lang:scala-library:2.12.4

This line indicates the bug:

org.typelevel:cats-core_2.12:1.0.0-RC1 -> 1.0.0-MF

That is, mainecoon dependency overrides the one explicitly specified in build.sbt.

0reactions
eed3si9ncommented, Aug 9, 2019

Here’s a PR to sort unknown qualifiers such as -MF before 1.0.0-RC1 - https://github.com/coursier/coursier/pull/1315

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange versions conflict in sbt strict mode - Stack Overflow
It is incorrectly reporting [1.26.0] as a version that was evicted by 1.26.0 . It's also including the same stuff three times with...
Read more >
coursier/coursier - Gitter
I'm playing with version reconciliation, and I don't understand why it's giving an ... [error] (evicted) lmcoursier.internal.shaded.coursier.error.conflict.
Read more >
Preventing Version Conflicts with versionScheme
This makes eviction warnings less reliable since many of these warnings are false positive, and, in practice, they are ignored by developers.
Read more >
Sbt binary incompatibilty errors - wiringbits
There seems to be a binary-incompatibility problem with our project dependencies (ref). Β· The error message suggests you to run sbt evicted whichΒ ......
Read more >
sbt Reference Manual β€” Library Management
sbt 1.3.0+ uses Coursier to implement dependency management. ... which shows the newer version as being selected and the older version as evicted....
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