Skip to content

Commit

Permalink
Remove gogoproto junk (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource authored Jan 11, 2024
1 parent 1f7a59c commit 10db5e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 160 deletions.
13 changes: 3 additions & 10 deletions temporal-test-server/src/main/proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,26 @@ PROTO_ROOT := .
PROTO_FILES = $(shell find $(PROTO_ROOT) -name "*.proto")
PROTO_DIRS = $(sort $(dir $(PROTO_FILES)))
PROTO_OUT := .gen
PROTO_IMPORTS := -I=$(PROTO_ROOT) -I=$(GOPATH)/src/github.com/temporalio/gogo-protobuf/protobuf
PROTO_IMPORTS := -I=$(PROTO_ROOT)

$(PROTO_OUT):
mkdir $(PROTO_OUT)

##### Compile proto files for go #####
grpc: buf-lint api-linter buf-breaking gogo-grpc fix-path
grpc: buf-lint api-linter buf-breaking fix-path

go-grpc: clean $(PROTO_OUT)
printf $(COLOR) "Compile for go-gRPC..."
$(foreach PROTO_DIR,$(PROTO_DIRS),protoc $(PROTO_IMPORTS) --go_out=plugins=grpc,paths=source_relative:$(PROTO_OUT) $(PROTO_DIR)*.proto;)

gogo-grpc: clean $(PROTO_OUT)
printf $(COLOR) "Compile for gogo-gRPC..."
$(foreach PROTO_DIR,$(PROTO_DIRS),protoc $(PROTO_IMPORTS) --gogoslick_out=Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:$(PROTO_OUT) $(PROTO_DIR)*.proto;)

fix-path:
mv -f $(PROTO_OUT)/temporal/api/* $(PROTO_OUT) && rm -rf $(PROTO_OUT)/temporal

##### Plugins & tools #####
grpc-install: gogo-protobuf-install
grpc-install:
printf $(COLOR) "Install/update gRPC plugins..."
go install google.golang.org/grpc/cmd/[email protected]

gogo-protobuf-install: go-protobuf-install
GO111MODULE=off go get github.com/temporalio/gogo-protobuf/protoc-gen-gogoslick

go-protobuf-install:
go install github.com/golang/protobuf/[email protected]

Expand Down
5 changes: 0 additions & 5 deletions temporal-test-server/src/main/proto/api-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,3 @@
- 'core::0127::http-annotation'
- 'core::0131::method-signature'
- 'core::0131::response-message-name'

- included_paths:
- 'dependencies/gogoproto/gogo.proto'
disabled_rules:
- 'all'
141 changes: 0 additions & 141 deletions temporal-test-server/src/main/proto/dependencies/gogoproto/gogo.proto

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ option csharp_namespace = "Temporalio.Api.TestService.V1";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "dependencies/gogoproto/gogo.proto";

message LockTimeSkippingRequest {
}
Expand All @@ -48,16 +47,16 @@ message UnlockTimeSkippingResponse {
}

message SleepUntilRequest {
google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp timestamp = 1;
}

message SleepRequest {
google.protobuf.Duration duration = 1 [(gogoproto.stdduration) = true];
google.protobuf.Duration duration = 1;
}

message SleepResponse {
}

message GetCurrentTimeResponse {
google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp time = 1;
}

0 comments on commit 10db5e3

Please sign in to comment.