mirror of https://github.com/sbt/sbt.git
Fixes https://github.com/sbt/sbt/issues/5976 Ref https://eed3si9n.com/enforcing-semver-with-sbt-strict-update This removes the guess-based EvictionWarning, and runs EvictionError instead. EvictionError uses the `ThisBuild / versionScheme` information supplied by the library authors in addition to `libraryDependencySchemes` that the build users could provide: ```scala ThisBuild / libraryDependencySchemes += "com.example" %% "name" % "early-semver" ``` as the version scheme "early-semver", "semver-spec", "pvp", "strict", or "always" may be used. Here's an example of `update` failure: ``` [error] * org.typelevel:cats-effect_2.13:3.0.0-M4 (early-semver) is selected over {2.2.0, 2.0.0, 2.0.0, 2.2.0} [error] +- com.example:use2_2.13:0.1.0-SNAPSHOT (depends on 3.0.0-M4) [error] +- org.http4s:http4s-core_2.13:0.21.11 (depends on 2.2.0) [error] +- io.chrisdavenport:vault_2.13:2.0.0 (depends on 2.0.0) [error] +- io.chrisdavenport:unique_2.13:2.0.0 (depends on 2.0.0) [error] +- co.fs2:fs2-core_2.13:2.4.5 (depends on 2.2.0) [error] [error] [error] this can be overridden using libraryDependencySchemes or evictionErrorLevel ``` This catches the violation of cats-effect_2.13:3.0.0-M4 version scheme (early-semver) without user setting additional overrides. If the user wants to opt-out of this, the user can do so per module: ```scala ThisBuild / libraryDependencySchemes += "org.typelevel" %% "cats-effect" % "always" ``` or globally as: ``` ThisBuild / evictionErrorLevel := Level.Info ``` |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||