Skip to content

Commit

Permalink
chore: remove gogo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jan 29, 2020
1 parent 01d8cae commit a20001d
Show file tree
Hide file tree
Showing 12 changed files with 341 additions and 7,554 deletions.
3 changes: 0 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions hack/generate-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ PATH="${PROJECT_ROOT}/dist:${PATH}"

# protbuf tooling required to build .proto files from go annotations from k8s-like api types
go build -i -o dist/go-to-protobuf ./vendor/k8s.io/code-generator/cmd/go-to-protobuf
go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo

cp dist/protoc-gen-gogo $GOPATH/bin

# Generate pkg/apis/<group>/<apiversion>/(generated.proto,generated.pb.go)
# NOTE: any dependencies of our types to the k8s.io apimachinery types should be added to the
Expand Down Expand Up @@ -47,13 +44,6 @@ go-to-protobuf \
# 1. protoc-gen-go - official golang/protobuf
go build -i -o dist/protoc-gen-go ./vendor/github.com/golang/protobuf/protoc-gen-go
GOPROTOBINARY=go
# 2. protoc-gen-gofast - fork of golang golang/protobuf. Faster code generation
go build -i -o dist/protoc-gen-gofast ./vendor/github.com/gogo/protobuf/protoc-gen-gofast
GOPROTOBINARY=gofast
# 3. protoc-gen-gogofast - faster code generation and gogo extensions and flexibility in controlling
# the generated go code (e.g. customizing field names, nullable fields)
go build -i -o dist/protoc-gen-gogofast ./vendor/github.com/gogo/protobuf/protoc-gen-gogofast
GOPROTOBINARY=gogofast
#
## protoc-gen-grpc-gateway is used to build <service>.pb.gw.go files from from .proto files
go build -i -o dist/protoc-gen-grpc-gateway ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
Expand All @@ -67,18 +57,15 @@ for i in ${PROTO_FILES}; do
# building natively (e.g. from workspace) vs. part of a docker build.
if [ -f /.dockerenv ]; then
GOOGLE_PROTO_API_PATH=$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
GOGO_PROTOBUF_PATH=$GOPATH/src/github.com/gogo/protobuf
else
GOOGLE_PROTO_API_PATH=${PROJECT_ROOT}/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
GOGO_PROTOBUF_PATH=${PROJECT_ROOT}/vendor/github.com/gogo/protobuf
fi
protoc \
-I${PROJECT_ROOT} \
-I/usr/local/include \
-I./vendor \
-I$GOPATH/src \
-I${GOOGLE_PROTO_API_PATH} \
-I${GOGO_PROTOBUF_PATH} \
--${GOPROTOBINARY}_out=plugins=grpc:$GOPATH/src \
--grpc-gateway_out=logtostderr=true:$GOPATH/src \
--swagger_out=logtostderr=true:. \
Expand Down
1,502 changes: 66 additions & 1,436 deletions server/cronworkflow/cron-workflow.pb.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions server/cronworkflow/cron-workflow.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
syntax = "proto3";
option go_package = "github.com/argoproj/argo/server/cronworkflow";

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1/generated.proto";
import "k8s.io/api/core/v1/generated.proto";

package cronworkflow;

Expand Down
Loading

0 comments on commit a20001d

Please sign in to comment.