X Tutup
The Wayback Machine - https://web.archive.org/web/20200926022151/https://github.com/danburkert/prost/issues/366
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

support not generating deprecated fields? #366

Open
TheVova opened this issue Sep 8, 2020 · 0 comments
Open

support not generating deprecated fields? #366

TheVova opened this issue Sep 8, 2020 · 0 comments

Comments

@TheVova
Copy link

@TheVova TheVova commented Sep 8, 2020

Currently, protobufs with annotated deprecated fields gets faithfully reproduced in prost, preserving the deprecated attribute on the field. those fields still take space in the generated rust structs as prost doesnt box its values by default (which is a good thing, mind).
I was wondering if an option to simply not include deprecated fields in the generated code would be interesting?
I tested it myself and that change is a one-liner in prost-build, omitting deprecated fields. This doesnt break anything, in the sense that trying to parse a protobuf containing these fields would just skip them, rather than crash or anything, which is the semantic im after.
would adding that as an option be acceptable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
X Tutup