-
Notifications
You must be signed in to change notification settings - Fork 524
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
Add support for marking fields as Cow #1202
base: master
Are you sure you want to change the base?
Conversation
4556734
to
78710e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the need for Cow
in fields. However, I think this implementation introduces more variants of the code generator and that reduces maintainability.
I am open to redoing the encoding
module to make support for Cow
easier. But I don't have the time to do that. I do have ideas about how to do that, so feel free to talk to me about that.
This PR is missing tests. If you can extensively prove the correct behavior (especially in combination with other Config
options), I will be able to accept a feature like this.
Hi @caspermeijn, Thank you for the feedback. I’ll focus on adding the necessary tests to this PR, particularly to verify its behavior with other Config options. I’m also interested in your ideas for implementing Cow support more effectively. If you can share any specifics, it would help guide the implementation. Let me know if there’s anything else you’d like addressed. |
Signed-off-by: Jon Doron <jond@wiz.io>
Signed-off-by: Jon Doron <jond@wiz.io>
Signed-off-by: Jon Doron <jond@wiz.io>
Signed-off-by: Jon Doron <jond@wiz.io>
Signed-off-by: Jon Doron <jond@wiz.io>
That would be a refactor of the |
Add support for marking fields as Cow thus avoiding the need to own a value, this can be done on Bytes and String types only.