-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enums were not consistently declared. Some were at the global scope, some others wire nested in messages. This moves all enums to the global scope and uses most of the official style guide rules here: https://developers.google.com/protocol-buffers/docs/style#enums Unfortunately this results in long and stuttering names of enum values in the code but this change is necessary to future-proof the proto and ensure no enum names conflict when we add new enums and values (all enum value names are in one namespace). I don't like the end result but not doing it appears to be worse. We have seen this first-hand in OTLP proto where enum names are inconsistent and are now impossible to fix due to backward compatibility concerns. Note: I ignored the rule to CAPITALIZE names and use underscores because if I do that the names in the code become unreadable walls of text. If anyone has any ideas how to fix the enum names issue in a nicer way I am happy to discard this PR. One alternate is to remove the prefixes from enum value names and just require that all enum value names introduced in the future are also unique, but I think it can result in weird names in the future.
- Loading branch information
1 parent
1993a38
commit fa48757
Showing
13 changed files
with
945 additions
and
886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.