Skip to content

Commit

Permalink
Generate golang code for non-serving protos (#618)
Browse files Browse the repository at this point in the history
* Generate golang code for non-serving protos as well

* Generate code with protoc 3.10.0

* Unnest from third_party dir
  • Loading branch information
Chen Zhiling authored Apr 14, 2020
1 parent 6c2cd01 commit 4f01f17
Show file tree
Hide file tree
Showing 17 changed files with 10,200 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ install-go-ci-dependencies:
go get -u golang.org/x/lint/golint

compile-protos-go: install-go-ci-dependencies
@$(foreach dir,types serving, cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos/ feast/$(dir)/*.proto;)
cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos/ tensorflow_metadata/proto/v0/*.proto
$(foreach dir,types serving core storage,cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos feast/$(dir)/*.proto;)

test-go:
cd ${ROOT_DIR}/sdk/go; go test ./...
Expand Down
1 change: 1 addition & 0 deletions protos/tensorflow_metadata/proto/v0/path.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tensorflow.metadata.v0;

option java_package = "org.tensorflow.metadata.v0";
option java_multiple_files = true;
option go_package = "github.com/gojek/feast/sdk/go/protos/tensorflow_metadata/proto/v0";

// A path is a more general substitute for the name of a field or feature that
// can be used for flat examples as well as structured data. For example, if
Expand Down
1 change: 1 addition & 0 deletions protos/tensorflow_metadata/proto/v0/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import "tensorflow_metadata/proto/v0/path.proto";
option cc_enable_arenas = true;
option java_package = "org.tensorflow.metadata.v0";
option java_multiple_files = true;
option go_package = "github.com/gojek/feast/sdk/go/protos/tensorflow_metadata/proto/v0";

// LifecycleStage. Only UNKNOWN_STAGE, BETA, and PRODUCTION features are
// actually validated.
Expand Down
Loading

0 comments on commit 4f01f17

Please sign in to comment.