You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the discussion in #2954, it was decided that it makes sense for SBT to use the lower bound
in case multiple version candidates are found. This was implemented in #2959 and sbt/librarymanagement#80.
The current implementation picks the lower bound of a version range if there is no specified upper bound (e.g., [2.4,)). However, it does not seem to pick the lower bound if there is a specified upper bound (e.g., [2.4,3.0)), which should probably also be the case.
Further, some test cases also look like the version range is converted to its upper bound, which I'm not sure is correct but could be.
Tested with SBT 1.1.0
Use case
Assuming you have a library that depends on Akka 2.4. So when using the library in another project, the Akka dependency should be transitively resolved. Since all 2.x versions following Akka 2.4 will be binary-compatible, it would be nice to define the dependency as "com.typesafe.akka" %% "akka-actor" % "[2.4,3.0)" (so SBT does not issue dependency incompatibility warnings). However, this will keep downloading the latest version (even if a compatible version is locally cached) and, more importantly, it will also download RC versions (which is usually not what you want).
The text was updated successfully, but these errors were encountered:
Akka Stream 2.4.20 depends on Akka Actors 2.4.20 (which is supported by the version range), but SBT resolves Akka Actors 2.5.11 (not sure if this is intended). In that specific case, it's easy to fix, but if you have a project, which explicitly depends on "2.4.20" and depends on library, which transitively depends on "[2.4,3.0)", SBT could resolve the 2.4.20 dependency satisfying all constraints (but it seems it resolves to 2.5.11 issuing eviction warnings).
Following the discussion in #2954, it was decided that it makes sense for SBT to use the lower bound
in case multiple version candidates are found. This was implemented in #2959 and sbt/librarymanagement#80.
The current implementation picks the lower bound of a version range if there is no specified upper bound (e.g.,
[2.4,)
). However, it does not seem to pick the lower bound if there is a specified upper bound (e.g.,[2.4,3.0)
), which should probably also be the case.Further, some test cases also look like the version range is converted to its upper bound, which I'm not sure is correct but could be.
Tested with SBT 1.1.0
Use case
Assuming you have a library that depends on Akka 2.4. So when using the library in another project, the Akka dependency should be transitively resolved. Since all 2.x versions following Akka 2.4 will be binary-compatible, it would be nice to define the dependency as
"com.typesafe.akka" %% "akka-actor" % "[2.4,3.0)"
(so SBT does not issue dependency incompatibility warnings). However, this will keep downloading the latest version (even if a compatible version is locally cached) and, more importantly, it will also download RC versions (which is usually not what you want).The text was updated successfully, but these errors were encountered: