Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark Error as #[non_exhaustive] #11

Open
sosthene-nitrokey opened this issue Oct 2, 2024 · 5 comments
Open

Mark Error as #[non_exhaustive] #11

sosthene-nitrokey opened this issue Oct 2, 2024 · 5 comments

Comments

@sosthene-nitrokey
Copy link
Contributor

sosthene-nitrokey commented Oct 2, 2024

#4 (file) Added a new error variant, which is a breaking change.

sosthene-nitrokey added a commit that referenced this issue Oct 2, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
sosthene-nitrokey added a commit that referenced this issue Oct 2, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
sosthene-nitrokey added a commit that referenced this issue Oct 2, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
@robin-nitrokey
Copy link
Member

Would you be fine with reverting the new error variant temporarily and just returning something like SerdeDeCustom or DeserializeBadU32 instead so that we can make a 0.4.1 release? That would make it easier to require specific features by setting a minimum version without having to do a migration to a 0.5.0 release right now.

@sosthene-nitrokey
Copy link
Contributor Author

sosthene-nitrokey commented Oct 4, 2024

I also want to say I'm pretty convinced we're the only ones using cbor-smol. I'd personally be fine with making a breaking change release 0.4.1 and yanking 0.4.0. There are many things that are exposed that I think should not be (the Writer trait and the field of Serializer for example).

Making #13 non-breaking would not be worth it imho.

sosthene-nitrokey added a commit that referenced this issue Oct 7, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
@robin-nitrokey
Copy link
Member

I’m not a fan of (deliberately) yanking for semver reasons. It only has a very limited effect and could be painful if you really need to go back to an old version for some reason. If we want to go that way, I’d prefer to just release 0.4.1 with the technically breaking but practically ineffectual change.

@sosthene-nitrokey
Copy link
Contributor Author

sosthene-nitrokey commented Oct 7, 2024

he technically breaking but practically ineffectual change

Do you mean the error variant or do you include #13 in it?

#13 is a bit bigger of a change, especially since some used features are not available by default (maybe they should be). It also removes the public fields in Serializer but I think it's fine.

sosthene-nitrokey added a commit that referenced this issue Oct 7, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
@robin-nitrokey
Copy link
Member

I did not consider #13. I’d just do a proper 0.5 release for it. We don’t have too many crates depending on cbor-smol so it’s not that much effort to update it.

sosthene-nitrokey added a commit that referenced this issue Oct 8, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
sosthene-nitrokey added a commit that referenced this issue Oct 9, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
sosthene-nitrokey added a commit that referenced this issue Oct 9, 2024
This allows better backwards compatibility and serializing to heapless directly.

Given #11 I went with a breaking change update
(the `Serializer` field was public and existing implementations are put behind a breaking change)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants