Transitive dependency causes wrong evictions
See original GitHub issueIn the example below my build.sbt depends on the angular webjar 1.4.7. My other dependency depends on angular webjar version [1.3.0). However the newest version of said jar is 1.5.0-beta.2
Expected: angular jar version 1.4.7 to be used, as it satisfies both requirement Actual: angular 1.4.7 evicted, and 1.5.0-beta.2 used instead, which does not satisfy my main build.sbt requirements (version 1.4.7)
organization := "vandra.hu"
name := "sbt-bug"
version := "0.0.1"
scalaVersion := "2.11.6"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8", "-feature")
libraryDependencies ++= Seq(
"org.webjars.bower" % "angular" % "1.4.7"
,"org.webjars.bower" % "angular-bootstrap" % "0.14.2"
)
pom.xml of angular-bootstrap:
(...)
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>angular</artifactId>
<version>[1.3.0,)</version>
</dependency>
Run results:
akovanm0:foo avandra$ sbt sbtVersion evicted
[info] Set current project to sbt-bug (in build file:/Users/avandra/projects/foo/)
[info] 0.13.6
[info] Updating {file:/Users/avandra/projects/foo/}foo...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * org.webjars.bower:angular:1.4.7 -> 1.5.0-beta.2 (caller: org.webjars.bower:angular-bootstrap:0.14.2, vandra.hu:sbt-bug_2.11:0.0.1)
[success] Total time: 1 s, completed Nov 27, 2015 12:39:19 PM
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Preventing Version Conflicts with versionScheme
A library that you pulled could depend on other libraries, and the transitive dependencies could cause version conflicts.
Read more >SBT: is it wise to fix eviction warnings of library dependencies
For evicted transitive dependencies (those dependencies only used directly by your own dependencies), it's likely best to simply leave the ...
Read more >sbt-build has eviction bug / duplicate libraries
Hi, there is a severe problem with the built-in sbt compilation / dependency-model. I have a library A that is published with a...
Read more >semantics of dependency resolvers - eed3si9n
A dependency resolver, or package manager, is a program that determines a consistent set of modules based on a set of constraints provided...
Read more >The server failed to start. See details for the ... - Mendix Forum
Hi all, Since I updated a project from 7.23.7 to 8.6.2 (Couldn't select from the dropdown) I'm having issues with evictions which is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Given that most people use the default Ivy conflict manager that picks the “latest”, perhaps we could provide an option to ignore the dynamic-ness of the dynamic revision when we translate POM, and everyone would be happy.
For example, if we treat Maven’s
[1.3.0,)
as Ivy1.3.0
, and your build.sbt brings in another Ivy1.4.7
, it will pick up1.4.7
as you expected.I confirmed using sbt 1.3.0-RC3 that 1.4.7 gets picked.