lloydmeta / enumeratum

A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
MIT License
1.19k stars 148 forks source link

enumeratum-play-json_2.13 1.6.2+ is incompatible with 1.6.1 #314

Closed OlegYch closed 3 years ago

OlegYch commented 3 years ago

build.sbt

scalaVersion := "2.13.5"
libraryDependencies ++= Seq(
  "com.alexdupre" %% "bitpay" % "2.2",
  "com.beachape" %% "enumeratum-play-json" % "1.6.2",
)

test.scala

object Main extends App {
  com.alexdupre.bitpay.models.TransactionSpeed
}

throws

java.lang.AbstractMethodError: Method com/alexdupre/bitpay/models/TransactionSpeed$.enumeratum$PlayJsonEnum$_setter_$keyWrites_$eq(Lplay/api/libs/json/KeyWrites;)V is abstract
    at com.alexdupre.bitpay.models.TransactionSpeed$.enumeratum$PlayJsonEnum$_setter_$keyWrites_$eq(TransactionSpeed.scala)
    at enumeratum.PlayJsonEnum.$init$(PlayJsonEnum.scala:6)
lloydmeta commented 3 years ago

Ugh, yea this is unfortunate.

I feel like it's too late to take this back now though, esp given the fact that we tend to break compatibility anyways when we bump the underlying lib being integrated with; maybe a read me update is the least worst option?

OlegYch commented 3 years ago

@lloydmeta have you considered adding https://github.com/scalacenter/sbt-version-policy to the build?

lloydmeta commented 3 years ago

That sounds neat; if it would help catch these issues 🙂 One concern I have is this SBT project is pretty big so we'll have to see if it will work in practice 😀

OlegYch commented 3 years ago

@lloydmeta it seems to work in #315