Replies: 4 comments 30 replies
-
On #483, Dale's recommendation was to check against the most recent version only, and we noted that many libraries make bumping that version part of their release process. (We do it that way in scala/scala, for example.) But that was back in early 2020. Since then, MiMa 0.9.0 introduced support for ignoring package-private methods. As @armanbilge has noted, e.g. at typelevel/cats#4062 (comment) last year (and also more recently on Discord), this introduces the possibility that a maintainer might, over the course of three releases, change a method as follows:
Each of the two steps individually passes MiMa, but taken together they break bincompat. |
Beta Was this translation helpful? Give feedback.
-
Any recommendation we make here could also potentially be propagated to downstream tooling such as https://github.com/scalacenter/sbt-version-policy and https://github.com/typelevel/sbt-typelevel. At present, sbt-version-policy compares against only a single previous version. sbt-typelevel compares against a range ( |
Beta Was this translation helpful? Give feedback.
-
In retrospect, MiMa is fast enough that I don't think running against multiple versions is so silly - obviously given the Arman's example. |
Beta Was this translation helpful? Give feedback.
-
Somewhat off-topic for this particular discussion, but it seems to me that part of the problem is that we don't have enough knobs for controlling binary-compatibility independently of source-compatibility. Thus, the two concepts get conflated. For example, the point of the package-private trick is to remove a public API (a source-level concern) without removing a public ABI (a binary-level concern). If we lose the ability to remove public APIs without triggering MiMa, then ultimately users will have to pay a price for this. Maybe that price is negligible with the proper use of Scala 3 has already made a fantastic step in this direction with the Towards that, I think having an annotation to mark a package-private as public ABI would be fantastic. I can already think of two use-cases:
|
Beta Was this translation helpful? Give feedback.
-
Perhaps we should add some documentation on this.
If I'm publishing version 2.4.6 of my library, do I need to check against 2.4.5 only? Against 2.4.0 only? Against all versions in the 2.4.0–5 range? What about previous minor versions such as 2.3.x?
There is some previous discussion at #483 , but it's just talk on a ticket.
Beta Was this translation helpful? Give feedback.
All reactions