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

v0.8.0 #198

Merged
merged 2 commits into from
Feb 8, 2023
Merged

v0.8.0 #198

merged 2 commits into from
Feb 8, 2023

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Feb 7, 2023

v0.8.0

  • Add Opaque variant to destination.ProtocolHint

## v0.8.0

* Add `Opaque` variant to `destination.ProtocolHint`
@hawkw hawkw requested review from olix0r and adleong February 7, 2023 18:28
@olix0r
Copy link
Member

olix0r commented Feb 7, 2023

Is this really a breaking change?

@olix0r
Copy link
Member

olix0r commented Feb 7, 2023

afaict this should be 0.7.1, unless we have an enum that needs updating. -- if so, can we make it non-exhaustive?

@hawkw
Copy link
Member Author

hawkw commented Feb 7, 2023

afaict this should be 0.7.1, unless we have an enum that needs updating. -- if so, can we make it non-exhaustive?

This adds a new variant to an enum, which is a breaking change: b2f7219#diff-e376e65ab87f7c7679472651d00eba584b6c134cd5ccf8a3b68f09e699944894R153-R157

I'm not sure if there's a way to get prost to add the #[non_exhaustive] attribute to generated enums, but I'll look into it. However, I think adding #[non_exhaustive] to an enum that is currently exhaustive is also a breaking change, since any exhaustive matching on that enum's variants would become invalid. Adding #[non_exhaustive] would be a nice way to avoid future breaking changes from new oneof variants, though...

@hawkw
Copy link
Member Author

hawkw commented Feb 7, 2023

It looks like we could use the enum_attribute method in prost-build to put #[non_exhaustive] on some or all of the enums generated for oneofs in the proto definition.

Tonic just merged a PR hyperium/tonic#1234 to expose this, and it should be available in the next tonic-build release.

@hawkw hawkw enabled auto-merge (squash) February 8, 2023 17:57
@hawkw hawkw merged commit 507f578 into main Feb 8, 2023
@hawkw hawkw deleted the eliza/0.8.0 branch February 8, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants