Skip to content

Commit

Permalink
Hack: Hardcode paths to wellknown types
Browse files Browse the repository at this point in the history
This is a hack to get grpc_cli working.
golang/protobuf#298

grpc_cli does not recognize the wellknown types. To get
grpc_cli to work, I adjusted the paths from the proper, language
agnostic, paths to the concrete, go specific, paths. I also adjusted my
repository to match the paths that the well known types were declaring
in their descriptors.
  • Loading branch information
gdbelvin committed May 19, 2017
1 parent 65a894d commit e94afbd
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 96 deletions.
2 changes: 1 addition & 1 deletion gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package trillian

//go:generate protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/googleapis/googleapis --go_out=plugins=grpc:$GOPATH/src trillian_log_api.proto trillian_map_api.proto trillian_admin_api.proto trillian.proto
//go:generate protoc -I=. -I=$GOPATH/src -I=$GOPATH -I=$GOPATH/src/github.com/googleapis/googleapis --go_out=plugins=grpc:$GOPATH/src trillian_log_api.proto trillian_map_api.proto trillian_admin_api.proto trillian.proto
//go:generate protoc -I=. --go_out=:$GOPATH/src crypto/sigpb/sigpb.proto
//go:generate protoc -I=. --go_out=:$GOPATH/src crypto/keyspb/keyspb.proto
//go:generate protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/google/trillian/vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I=$GOPATH/src/github.com/googleapis/googleapis/ --grpc-gateway_out=logtostderr=true:$GOPATH/src trillian_log_api.proto trillian_map_api.proto trillian_admin_api.proto trillian.proto
119 changes: 60 additions & 59 deletions trillian.pb.go

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

3 changes: 2 additions & 1 deletion trillian.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ package trillian;

import "crypto/keyspb/keyspb.proto";
import "crypto/sigpb/sigpb.proto";
import "google/protobuf/any.proto";
//import "google/protobuf/any.proto";
import "github.com/golang/protobuf/ptypes/any/any.proto";

// What goes in here?
// Things which are exposed through the public trillian APIs.
Expand Down
67 changes: 34 additions & 33 deletions trillian_admin_api.pb.go

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

4 changes: 2 additions & 2 deletions trillian_admin_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ package trillian;
import "trillian.proto";
import "crypto/keyspb/keyspb.proto";
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/empty.proto";
import "github.com/google/protobuf/src/google/protobuf/field_mask.proto";
import "github.com/golang/protobuf/ptypes/empty/empty.proto";

// ListTrees request.
// No filters or pagination options are provided.
Expand Down

0 comments on commit e94afbd

Please sign in to comment.