News for hackers. Stuff that matters.
Re:Why We’re Switching to gRPC by dweis on Monday May 27, 2019 @02:16PM (#20024145)
Minor nit, but not necessarily. For basically all values of SomeMessage, dec should fail to parse due to improperly encoded UTF8 data for field 2 (modulo some proto2 vs. proto3 and language binding implementation differences).

Change field 2 to a bytes field instead of a string field and then yes.

Re:Why We’re Switching to gRPC by shereadsthenews on Monday May 27, 2019 @02:28PM (#20024224)
I should mention that I consider this a feature not a bug. The isomorphism permits an endpoint to use ‘bytes submessage_i_dont_need_to_decode’ to cheaply handle nested message structures that need to be preserved but not inspected, such as in a proxy application.
Re:Why We’re Switching to gRPC by shereadsthenews on Monday May 27, 2019 @02:25PM (#20024210)
True but UTF8 enforcements was quite absent in all implementations until proto3, and the empty string would be a special case.