0

In SBT 1.2.8 I'm getting evicted warnings in my project due to importing 3 plugins - sbt-scalajs-crossproject (0.6.0), sbt-scalajs (0.6.26) and sbt-assembly (0.14.9).

The dependency graph is as below, two evictions are present and warned when I even start sbt console.

enter image description here

I know how to override eviction warnings for libraries I import, but how to control them for plugins? Both overrides here seem harmless, they are just minor version bumps.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420

1 Answers1

0

To override dependencies of plugins set dependencyOverrides in project/plugins.sbt. For example, say the following project/plugins.sbt

addSbtPlugin("org.scala-js"       % "sbt-scalajs"                   % "0.6.26")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject"      % "0.6.0")
addSbtPlugin("com.eed3si9n"       % "sbt-assembly"                  % "0.14.9")

gives the eviction warning

[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-js:sbt-scalajs:0.6.26 is selected over 0.6.23
[warn]      +- default:project:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0) (depends on 0.6.26)
[warn]      +- org.portable-scala:sbt-scalajs-crossproject:0.6.0 (scalaVersion=2.12, sbtVersion=1.0) (depends on 0.6.23)

Then setting

dependencyOverrides ++= Seq("org.scala-js" % "sbt-scalajs" % "0.6.26")

in project/plugins.sbt should silence the warning.

In general, my suggestion would be to keep the warnings around until we can resolve them properly through updates.

Mario Galic
  • 47,285
  • 6
  • 56
  • 98