Closed metin-kale closed 9 months ago
Dumb question: Would changing the type from class
to data class
be API breaking? I would assume no, as only some methods on top appear...
In General I would agree, that those messages should definitely be data classes!
I ask for picking the correct label category on which we base the release notes later on...
No, it should not be api breaking at all. Construction and reading a data class object is the same.
ComponentValidationMessage turned out to be a "open class". Therefore the change is indeed api-breaking! Because using ComponentValidationMessage as supertype is rather rare we still decided to change it to data class instead.
see #808
ComponentValidationMessage does not implement equals()/hashCode(). Even if we have exact the same ComponentValidationMessage''s, equals() will say they are un-equal.
If we e.g. use ValidatingStore.allMessages().distinctUntilChanged(), the distinctUntilChanged will be useless, because the Messages will never be equal.
We should either use a 'data class' oder implement proper equals()/hashCode()-Functions.