generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: statically extract .proto from Go source (#2973)
This adds a general purpose command `go2proto` that statically generates a `.proto` file from Go source code. This used to be done via reflection, but that resulted in a chicken and egg problem whereby the reflection code needed to be compilable in order to generate the protobuf files that the reflection code depended on. A couple of minor side-effects: 1. This will automatically extract sum types and enums. 2. The runtime types have been moved directly into the schema, as opposed to only existing in the proto. 3. Sum type elements will need to be tagged with a `//protobuf:<id>` directive. These are the breaking changes: ``` backend/protos/xyz/block/ftl/v1/schema/schema.proto:43:26:Field "5" on message "Data" changed name from "typeParameters" to "type_parameters". backend/protos/xyz/block/ftl/v1/schema/schema.proto:162:3:Field "2" with name "kind" on message "MetadataAlias" changed type from "int64" to "enum". backend/protos/xyz/block/ftl/v1/schema/schema.proto:197:10:Field "3" on message "MetadataRetry" changed name from "minBackoff" to "min_backoff". backend/protos/xyz/block/ftl/v1/schema/schema.proto:198:10:Field "4" on message "MetadataRetry" changed name from "maxBackoff" to "max_backoff". backend/protos/xyz/block/ftl/v1/schema/schema.proto:210:10:Field "3" on message "MetadataTypeMap" changed name from "nativeName" to "native_name". backend/protos/xyz/block/ftl/v1/schema/schema.proto:245:17:Field "4" on message "Ref" changed name from "typeParameters" to "type_parameters". backend/protos/xyz/block/ftl/v1/schema/schema.proto:350:3:Field "3" with name "status" on message "VerbRuntime" changed type from "xyz.block.ftl.v1.schema.Status" to "xyz.block.ftl.v1.schema.VerbStatus". ``` None of these changes should effect wire compatibility. Fixes #2935
- Loading branch information
1 parent
e844771
commit 0a7e36b
Showing
59 changed files
with
2,108 additions
and
1,692 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
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.