Enum aliases in Protobuf can lead to confusion and breakage, especially when using reflection or JSON, due to ambiguity in enum value representation. Despite seeming useful for renaming without breaking code, issues arise with serialized JSON. To avoid these pitfalls, it's recommended to create new enum types in updated API versions. The ENUM_NO_ALLOW_ALIAS Buf lint rule discourages enum aliases to prevent these problems.

3m read timeFrom mcyoung.xyz
Post cover image

Sort: