From a385a13fa5039f3953e0806b11a3f6db419cb9c0 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Thu, 2 Nov 2017 15:10:05 +0900 Subject: [PATCH] fix incorrect eviction warning message --- .../main/scala/sbt/librarymanagement/EvictionWarning.scala | 2 +- ivy/src/test/scala/EvictionWarningSpec.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/sbt/librarymanagement/EvictionWarning.scala b/core/src/main/scala/sbt/librarymanagement/EvictionWarning.scala index ba0a1318e..1aeb40ebf 100644 --- a/core/src/main/scala/sbt/librarymanagement/EvictionWarning.scala +++ b/core/src/main/scala/sbt/librarymanagement/EvictionWarning.scala @@ -283,7 +283,7 @@ object EvictionWarning { out += "Scala version was updated by one of library dependencies:" out ++= (a.scalaEvictions flatMap { _.lines }) out += "To force scalaVersion, add the following:" - out += "\tivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }" + out += "\tscalaModuleInfo ~= (_.map(_.withOverrideScalaVersion(true)))" } if (a.directEvictions.nonEmpty || a.transitiveEvictions.nonEmpty) { diff --git a/ivy/src/test/scala/EvictionWarningSpec.scala b/ivy/src/test/scala/EvictionWarningSpec.scala index 1601962d9..48ef1ff0a 100644 --- a/ivy/src/test/scala/EvictionWarningSpec.scala +++ b/ivy/src/test/scala/EvictionWarningSpec.scala @@ -93,7 +93,7 @@ class EvictionWarningSpec extends BaseIvySpecification { "\t* org.scala-lang:scala-library:2.10.3 is selected over 2.10.2", "", "To force scalaVersion, add the following:", - "\tivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }", + "\tscalaModuleInfo ~= (_.map(_.withOverrideScalaVersion(true)))", "Run 'evicted' to see detailed eviction warnings" ) } @@ -109,7 +109,7 @@ class EvictionWarningSpec extends BaseIvySpecification { "\t +- com.example:foo:0.1.0 (depends on 2.10.2)", "", "To force scalaVersion, add the following:", - "\tivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }", + "\tscalaModuleInfo ~= (_.map(_.withOverrideScalaVersion(true)))", "Run 'evicted' to see detailed eviction warnings" ) }