IME so far it’s strictly worse than Scala 2’s linting support + -Xfatal-warnings
.
In Scala 2 you do literally nothing and get actionable errors for the cases you care about (i.e. where you are mistakenly comparing values of different types).
In Scala 3 you have to pepper derives CanEqual
on every non-primitive type where you’ll be doing equality checking.
For example, here are some ScalaTest failures that have me considering giving up and disabling strictEquality
in sbt test scope.
assert(x == Some(model))
Values of types Option[User] and Some[User] cannot be compared with == or !=
assert(x == List(model))
Values of types List[User] and List[User] cannot be compared with == or !=
Compared to Scala 2 it’s kind of like the tail wagging the dog, but I guess this is the only solution until linting support lands in Scala 3.