-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace gogo protobuf with google's protobuf v2 compiler (#317)
**What changed?** gogo/protobuf has been replaced with Google's official go compiler. I also changed our code generation to use buf as it was slightly easier to manage plugin versions, though I may revert that. **Why?** gogo/protobuf has been deprecated for some time and the community is moving on, building new tools (like vtproto) atop google's v2 compiler. **Breaking changes** - `*time.Time` in proto structs will now be [timestamppb.Timestamp](https://pkg.go.dev/google.golang.org/protobuf@v1.31.0/types/known/timestamppb#section-documentation) - `*time.Duration` will now be [durationpb.Duration](https://pkg.go.dev/google.golang.org/protobuf/types/known/durationpb) - V2-generated structs embed locks, so you cannot dereference them willy-nilly. `go vet` will scream at you about this - Proto enums will, when formatted to JSON, now be in `SCREAMING_SNAKE_CASE` rather than `PascalCase`. We decided (in discussion with the SDK team) that now was as good a time as any to rip the bandage off
- Loading branch information
1 parent
0165f4a
commit a19522a
Showing
25 changed files
with
219 additions
and
535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
FROM temporalio/base-ci-builder:1.5.0 | ||
WORKDIR /temporal | ||
FROM temporalio/base-ci-builder:1.10.3 | ||
WORKDIR /temporal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.idea | ||
/.gen | ||
/.vscode | ||
/.vscode | ||
/.stamp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1 | ||
plugins: | ||
- plugin: buf.build/protocolbuffers/go:v1.31.0 | ||
out: ./ | ||
opt: | ||
- paths=source_relative | ||
- plugin: buf.build/grpc/go:v1.3.0 | ||
out: ./ | ||
opt: | ||
- paths=source_relative | ||
- plugin: buf.build/grpc-ecosystem/gateway:v2.18.0 | ||
out: ./ | ||
opt: | ||
- paths=source_relative | ||
- allow_patch_feature=false | ||
- name: go-helpers | ||
out: ./ | ||
path: ["go", "run", "./protoc-gen-go-helpers"] | ||
opt: | ||
- paths=source_relative |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: googleapis | ||
repository: googleapis | ||
commit: 28151c0d0a1641bf938a7672c500e01d | ||
- remote: buf.build | ||
owner: grpc-ecosystem | ||
repository: grpc-gateway | ||
commit: 048ae6ff94ca4476b3225904b1078fad |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
version: v1 | ||
deps: | ||
- buf.build/grpc-ecosystem/grpc-gateway | ||
build: | ||
excludes: | ||
# Buf won't accept a local dependency on the google protos but we need them | ||
# to run api-linter, so just tell buf it ignore it | ||
breaking: | ||
use: | ||
- WIRE_JSON | ||
ignore: | ||
lint: | ||
use: | ||
- DEFAULT | ||
ignore: | ||
- dependencies | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.