-
Notifications
You must be signed in to change notification settings - Fork 533
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
The deprecated attribute #221
Comments
Nope, should be relatively straightforward. Sounds like a great feature addition to |
danburkert
referenced
this issue
Jan 18, 2020
Protobufs support `deprecated` field options. These field options allow the field to continue to be supported, but allow for language specific code generators to include that the field has been deprecated in the generated code. As discussed in https://github.com/danburkert/prost/issues/221 we should consider supporting this in `prost`. This commit adds support for this feature in `prost-build` by checking the field options, and if present emitting a `#[deprecated]` attribute. One short coming of this change is that it is difficult to test that the `deprecated` attribute is correctly added with an assertion since the attribute is not accessible at runtime.
dunmatt
referenced
this issue
in dunmatt/prost
Apr 1, 2020
Protobufs support `deprecated` field options. These field options allow the field to continue to be supported, but allow for language specific code generators to include that the field has been deprecated in the generated code. As discussed in https://github.com/danburkert/prost/issues/221 we should consider supporting this in `prost`. This commit adds support for this feature in `prost-build` by checking the field options, and if present emitting a `#[deprecated]` attribute. One short coming of this change is that it is difficult to test that the `deprecated` attribute is correctly added with an assertion since the attribute is not accessible at runtime.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
I have a proto file with some
[deprecated=true]
attributes in it, like this one:From what I can tell, it doesn't propagate the attribute into the generated code. Would it be hard to place the
#[deprecated]
attribute onto the generated code?The text was updated successfully, but these errors were encountered: