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

Cache version specific encoders/decoders. #652

Merged
merged 1 commit into from
May 3, 2021

Conversation

alecthomas
Copy link
Contributor

Fixes #651.

I'm not 100% sure this is the best fix, but it does work.

@achille-roussel achille-roussel self-requested a review May 3, 2021 03:11
@achille-roussel achille-roussel self-assigned this May 3, 2021
@achille-roussel
Copy link
Contributor

Thanks for the fix 👍

We did make the assumption that the Marshal/Unmarshal functions would be used in the context of a kafka connection from one program to a cluster, in which case the version was not going to change. With this change, the functions are useful in more contexts.

@achille-roussel achille-roussel merged commit 8462374 into segmentio:master May 3, 2021
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

Successfully merging this pull request may close these issues.

protocol.Marshal() always uses fields from the first version it is called with
2 participants