Disabling field names – reserved names
Important message
For the sake of simplicity, I will be using Go for this example. If you are not familiar with this language, don’t worry. The example is small, and Go is a simple language. I am 100% confident that you can understand what’s going on.
We previously saw the need for reserved tags and how they can help with backward and forward compatibility. In this section, we will focus on the impact of the schema’s evolution on the code we are writing.
As we know, Protoc is mostly used to generate code out of proto files. This generated code is then used in our application to abstract the Protobuf encoding/decoding. While this is great, this creates some problems when the schemas evolve. Some of these problems can only be solved by going through the code manually and updating it but others are preventable.
Let’s see an example of a preventable problem. As you may recall, we now have v1, v2, and...