lightbend-labs / mima

A tool for catching binary incompatibility in Scala
Apache License 2.0
459 stars 71 forks source link

Don't normalize cross scala version suffix. and/or fix README example #327

Closed xuwei-k closed 5 years ago

xuwei-k commented 5 years ago

since 0.4.0

https://github.com/lightbend/mima/commit/40a2cbe042a203f8fddfb02b0a27907f6c6dc93d

build.sbt

scalaVersion := "2.12.8"

// works
mimaPreviousArtifacts := Set(
  "org.scalaz" %% "scalaz-core" % "7.2.28"
)

// does not work. unresolved dependency
mimaPreviousArtifacts := Set(
  "org.scalaz" % s"scalaz-core_${scalaBinaryVersion.value}" % "7.2.28"
)

log

[warn]  module not found: org.scalaz#scalaz-core_2-12;7.2.28
[warn] ==== local: tried
[warn]   /Users/kenji/.ivy2/local/org.scalaz/scalaz-core_2-12/7.2.28/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalaz/scalaz-core_2-12/7.2.28/scalaz-core_2-12-7.2.28.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /Users/kenji/.sbt/preloaded/org.scalaz/scalaz-core_2-12/7.2.28/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////Users/kenji/.sbt/preloaded/org/scalaz/scalaz-core_2-12/7.2.28/scalaz-core_2-12-7.2.28.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scalaz#scalaz-core_2-12;7.2.28: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

README says 😕

mimaPreviousArtifacts := Set("com.jsuereth" % "scala-arm_2.9.1" % "1.2")
dwijnand commented 5 years ago

Hey, @xuwei-k.

So I definitely think the README file should suggest %%.

I also think we should try to support both your % s"scalaz-core_${scalaBinaryVersion.value}" and ticket #168's %% "harmony_cats0.9.0_scalaz7.2".

I'm thinking: only normalising if the ModuleId is %%?

Need to think about it, but I'll try to release a bug-fix for this ASAP.