You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _overviews/tutorials/binary-compatibility-for-library-authors.md
-23Lines changed: 0 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,6 @@ alice match
255
255
Later in time, you can amend the original case class definition to, say, add an optional `address` field. You
256
256
* add a new field `address` and a custom `withAddress` method,
257
257
* update the public `apply` method in the companion object to initialize all the fields,
258
-
* tell MiMa to [ignore](https://github.com/lightbend/mima#filtering-binary-incompatibilities) changes to the class constructor. This step is necessary because MiMa does not yet ignore changes in private class constructor signatures (see [#738](https://github.com/lightbend/mima/issues/738)).
Otherwise, MiMa would fail with an error like “method this(java.lang.String,Int)Unit in class Person does not have a correspondent in current version”.
299
-
300
-
> Note that an alternative solution, instead of adding a MiMa exclusion filter, consists of adding back the previous
301
-
> constructor signatures as secondary constructors:
The original users can use the case class `Person` as before, all the methods that existed before are present unmodified after this change, thus the compatibility with the existing usage is maintained.
0 commit comments