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
Maybe this bugfix can be justified as part of larger PR #485 but I don't like changes that might be breaking changes for some.
@benluddy what are your thoughts on this specific bugfix and this type of bugfix in general? We currently follow SemVer with some limited exceptions noted in README.
I agree with the desired behavior but wouldn't make the breaking change. Users who differentiate error handling behaviors based on specific errors from a cbor.Marshaler are exactly the same users that would potentially be broken by wrapping the error, and other users would only see marginal benefit.
Instead of making this change and trying to communicate it loudly to users, WDYT about addressing this as part of a new marshaler interface (#485 (review))?
Instead of making this change and trying to communicate it loudly to users, WDYT about addressing this as part of a new marshaler interface (#485 (review))?
@benluddy Thanks, I opened issue to add new interface as alternative to Marshaler:
Currently, error returned from
MarshalCBOR()
are returned from codec as is, without being wrapped.PR #485 adds
MarshalerError
, which wraps error from well-formedness check for CBOR data item returned fromMarshalCBOR()
.However, error returned directly from
MarshalCBOR()
should also be wrapped inMarshalerError
to be consistent with Go'sencoding/json
package.Resolving this would be a breaking change due to different type of error being returned which only affects error handling of
Marshaler
.The text was updated successfully, but these errors were encountered: