Remove Has/Clear members for C# message fields in proto2#7429
Remove Has/Clear members for C# message fields in proto2#7429jskeet merged 3 commits intoprotocolbuffers:masterfrom
Conversation
This is a breaking change in terms of proto2 code generation: users who were previously using these members will have to change to null checks for message fields. After toying with removing Has/Clear for proto2 oneof fields, I've left them alone in this commit, for consistency with other languages. The inconsistency between proto2 and proto3 won't come up here, because proto3 oneof fields can never be explicitly optional. Fixes protocolbuffers#7395.
(This removes the Has/Clear members for message types in proto2.)
(This was the only use of a HasXyz property for a message type.)
|
@haberman Ping? Just checking you've seen this... |
|
Sorry for the slow reply. I think this is fine from a correctness and API design perspective. My only possible worry is around the sorts of concerns you raised on #7434 (comment). It's true though that you only get the change when you regenerate your code. |
Definitely understand the concern. I'm less worried here though, for a few reasons:
If you're happy with those justifications, I'll merge. If not, I'm definitely happy to chat about it more and see whether there are alternative options (although I can't think of any right now). cc @jtattermusch just for the sake of interest in compatibility. |
cc @ObsidianMinor