diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..9f844a3a2e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "proto/third_party/protobuf"] + path = proto/third_party/protobuf + url = git@github.com:protocolbuffers/protobuf.git +[submodule "proto/third_party/googleapis"] + path = proto/third_party/googleapis + url = git@github.com:googleapis/googleapis.git diff --git a/proto/Makefile b/proto/Makefile index 214b36066b..dab84fa9c3 100644 --- a/proto/Makefile +++ b/proto/Makefile @@ -1,4 +1,4 @@ -THIRD_PARTY_ROOT := ../../proto/third_party +THIRD_PARTY_ROOT := ./third_party GOOGLEAPIS := $(THIRD_PARTY_ROOT)/googleapis PROTOBUF := $(THIRD_PARTY_ROOT)/protobuf/src diff --git a/proto/README.md b/proto/README.md index e4c141578b..79d320504d 100644 --- a/proto/README.md +++ b/proto/README.md @@ -1,27 +1,16 @@ -The top-level directory for protobuf message and service definitions. +Protobuf message and service definitions. `Makefile` generates golang message and service stub implementations into //go/gen/proto/. The generated code is checked into the repository. -Typescript and javascript artifact generation has been disabled for the time being. - Dependencies ------------ -You need `protoc-gen-go` and `ts-protoc-gen`. To build `ts-protoc-gen`, you -need to install bazel. +Dependencies are git submodules in //proto/third_party. You need to build +protoc in //proto/third_party/protobuf by running `bazel build //:protoc` from +that directory. Currently tested with bazel version 0.28.0. -``` -$ go get -u github.com/golang/protobuf/protoc-gen-go - -$ mkdir -p $HOME/src/3p -$ pushd $HOME/src/3p -$ [ -d ts-protoc-gen ] || git clone git@github.com:improbable-eng/ts-protoc-gen.git -$ cd ts-protoc-gen -$ git checkout 0.7.6 -$ bazel build //... -$ popd -``` +Dependency tracking and hermeticity here poor. Generating code --------------- diff --git a/proto/third_party/googleapis b/proto/third_party/googleapis new file mode 160000 index 0000000000..fa39cea186 --- /dev/null +++ b/proto/third_party/googleapis @@ -0,0 +1 @@ +Subproject commit fa39cea186a3caa2f386e82f7653d189ecffaa9a diff --git a/proto/third_party/protobuf b/proto/third_party/protobuf new file mode 160000 index 0000000000..6a59a2ad1f --- /dev/null +++ b/proto/third_party/protobuf @@ -0,0 +1 @@ +Subproject commit 6a59a2ad1f61d9696092f79b6d74368b4d7970a3