Skip to content

Commit f20e112

Browse files
authored
Grpc next (#119)
* Stash changes on this WIP branch to advance state of GRPC stuff. * WIP with more recent inputs, same basic fail... * Checkpoint at state where we are trying to cd into th external/com_github_grpc_grpc for reflection.proto * First working version! * Move WORKSPACE experimental rules to deps.bzl * Rename to com_google_protobuf * Migrate to com_google_grpc and update java deps * Update all to latest * Buildify all the things * Fix python, csharp and introduce generated DEPENDENCIES.md * Convert http to https, use relative local_reposistory * Rebase on master and finalize changes for 0.8.0
1 parent 439c57e commit f20e112

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1315
-639
lines changed

.travis.yml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ os:
88
- osx
99

1010
env:
11-
- V=0.4.5
12-
- V=0.4.4
13-
- V=0.4.3
14-
- V=0.4.1
15-
- V=0.3.1
11+
- V=0.5.4
12+
- V=0.5.2
1613

1714
before_install:
1815
- OS=linux
@@ -30,49 +27,10 @@ before_install:
3027
- chmod +x install.sh
3128
- ./install.sh --user
3229
- rm -f install.sh
30+
- sudo pip install grpcio==1.6.0
3331

3432
script:
35-
- |
36-
bazel \
37-
--output_base=$HOME/.cache/bazel \
38-
--batch \
39-
--host_jvm_args=-Xmx500m \
40-
--host_jvm_args=-Xms500m \
41-
test \
42-
--verbose_failures \
43-
--test_output=errors \
44-
--test_strategy=standalone \
45-
--spawn_strategy=standalone \
46-
--genrule_strategy=standalone \
47-
--local_resources=400,2,1.0 \
48-
--worker_verbose \
49-
--strategy=Javac=worker \
50-
--strategy=Closure=worker \
51-
--deleted_packages=tests/external_proto_library \
52-
//examples/helloworld/closure/... \
53-
//examples/helloworld/cpp/... \
54-
//examples/helloworld/go/... \
55-
//examples/helloworld/grpc_gateway/... \
56-
//examples/helloworld/java/... \
57-
//examples/wkt/... \
58-
$FLAGS \
59-
&& \
60-
(cd tests/external_proto_library && bazel \
61-
--output_base=$HOME/.cache/bazel \
62-
--batch \
63-
--host_jvm_args=-Xmx500m \
64-
--host_jvm_args=-Xms500m \
65-
build \
66-
--verbose_failures \
67-
--test_output=errors \
68-
--test_strategy=standalone \
69-
--spawn_strategy=standalone \
70-
--genrule_strategy=standalone \
71-
--local_resources=400,2,1.0 \
72-
--worker_verbose \
73-
--strategy=Javac=worker \
74-
--strategy=Closure=worker \
75-
//:*)
33+
- make all
7634

7735
notifications:
7836
email: false

BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
load("@io_bazel_rules_go//go:def.bzl", "go_prefix")
22

33
go_prefix("github.com/pubref/rules_protobuf")
4+
5+
6+
load("//protobuf:rules.bzl", "proto_dependencies")
7+
8+
proto_dependencies(
9+
name = "deps",
10+
format = "markdown",
11+
)

CHANGES.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## v0.8.0 (Wed Sep 6 2017)
2+
3+
This is a significant (possibly overreaching) update that brings grpc
4+
support up to latest. rules_protobuf should also load much faster
5+
than previously. Some of the names of external workspaces have
6+
changed that may break your build (for example, string references such
7+
as 'external/com_github_google_protobuf/src' should be migrated to
8+
'external/com_google_protobuf/src' in an 'imports' attribute).
9+
10+
* Introduce cpp/grpc_repository.bzl to setup a custom @com_google_grpc
11+
external workspace (no longer using git_repository#init_submodules).
12+
This pulls down grpc/grpc from github as @com_google_grpc_base, sets
13+
up a mirrored external workspace in @com_google_grpc that symlinks
14+
to @com_google_grpc_base, then does a "git submodule the hard way" for
15+
c-ares, and installs a patched version of generate_cc.bzl.
16+
* Rename repository @com_github_google_protobuf to @com_google_protobuf.
17+
* Rename repository @com_github_grpc_grpc to @com_google_grpc.
18+
* Rename repository @gtest to @com_google_googletest.
19+
* Updated grpc/grpc to 1.6.1.
20+
* Updated madler/zlib to 1.2.11.
21+
* Updated boringssl to master-with-bazel Sep 2 2017.
22+
* Updated nuget deps to 1.6.0.
23+
* Adding binding to //external:protocol_compiler (that's what with grpc repo wants).
24+
* Remove binding //external:protoc (now //external:protocol_compiler).
25+
* Migrated all git_repository repository_rules to http_archive
26+
(faster).
27+
28+
## v0.7.2 (Fri Jul 14 2017)
29+
30+
* Updated boringssl to latest chromium-stable (@pcj)
31+
* Updated grpc-java to 1.4.0 (@zhexuany)
32+
* Fixed broken links in README (@mikesamuel)
33+
* Improve gogo{fast,faster,slick}_proto_compile (@timpalpant)
34+
* Support grpc_gateway 1.2 (@pcj)
35+
* Improved grpc_gateway documentation (@prestonvanloon)
36+
* Update grpc go t0 1.2.1 (@clownpriest)
37+
* Overall documentation improvments (@cheister)
38+
* Fixed require bug (@raraujosc)
39+
* Upgrade gogo deps (@geeknoid)
40+
* Java documentation improvements (@bzz)
41+
* Add support for gogofast, gogofaster, and gogoslick (@douglas-reid)
42+
* Add -request_context option to grpc_gateway_library (@pcj)
43+
* Automatically export //java:grpc_compiletime_deps (@perezd)
44+
* Add importmap to gogo_proto_library (@gsf)
45+
* Documentation improvments (@Maverick-Crank-GRey)
46+
* Improved python support (Nikos Michalakis)
47+
* README update (@wiktortomczak)

DEPENDENCIES.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Language dependencies for rules_protobuf
2+
To update this list, `bazel build @org_pubref_rules_protobuf//:deps && cp bazel-bin/DEPENDENCIES.md .`
3+
4+
## Protobuf
5+
6+
| Rule | Workspace | Detail |
7+
| ---: | :--- | :--- |
8+
| [http_archive](https://docs.bazel.build/versions/master/be/workspace.html#http_archive) | **`@com_google_protobuf`** | [sha256:e83ee63eccfb](https://github.com/google/protobuf/archive/2807436cd828a526c5c38dd235c0d0d9cdc67b1f.zip) |
9+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protoc`** | `//external:protoc` (`@com_google_protobuf//:protoc`) |
10+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protocol_compiler`** | `//external:protocol_compiler` (`@com_google_protobuf//:protoc`) |
11+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protobuf`** | `//external:protobuf` (`@com_google_protobuf//:protobuf`) |
12+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protobuf_clib`** | `//external:protobuf_clib` (`@com_google_protobuf//:protoc_lib`) |
13+
14+
## C++
15+
16+
| Rule | Workspace | Detail |
17+
| ---: | :--- | :--- |
18+
| [http_archive](https://docs.bazel.build/versions/master/be/workspace.html#http_archive) | **`@com_google_grpc_base`** | [sha256:95ee013fdb60](https://github.com/grpc/grpc/archive/f5600e99be0fdcada4b3039c0f656a305264884a.zip) |
19+
| grpc_repository | **`@com_google_grpc`** | |
20+
| [new_http_archive](https://docs.bazel.build/versions/master/be/workspace.html#new_http_archive) | **`@com_github_c_ares_c_ares`** | [sha256:ddce8def076a](https://github.com/c-ares/c-ares/archive/7691f773af79bf75a62d1863fd0f13ebf9dc51b1.zip) |
21+
| [http_archive](https://docs.bazel.build/versions/master/be/workspace.html#http_archive) | **`@boringssl`** | [(no hash provided)](https://boringssl.googlesource.com/boringssl/+archive/74ffd81aa7ec3d0aa3d3d820dbeda934958ca81a.tar.gz) |
22+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@libssl`** | `//external:libssl` (`@boringssl//:ssl`) |
23+
| [new_http_archive](https://docs.bazel.build/versions/master/be/workspace.html#new_http_archive) | **`@com_github_madler_zlib`** | [sha256:1cce3828ec2b](https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.zip) |
24+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@cares`** | `//external:cares` (`@com_google_grpc//third_party/cares:ares`) |
25+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@zlib`** | `//external:zlib` (`@com_github_madler_zlib//:zlib`) |
26+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@nanopb`** | `//external:nanopb` (`@com_google_grpc//third_party/nanopb`) |
27+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protoc_gen_grpc_cpp`** | `//external:protoc_gen_grpc_cpp` (`@com_google_grpc//:grpc_cpp_plugin`) |
28+
| [http_archive](https://docs.bazel.build/versions/master/be/workspace.html#http_archive) | **`@com_google_googletest`** | [sha256:f87029f64727](https://github.com/google/googletest/archive/7c6353d29a147cad1c904bf2957fd4ca2befe135.zip) |
29+
30+
## Java
31+
32+
| Rule | Workspace | Detail |
33+
| ---: | :--- | :--- |
34+
| [http_file](https://docs.bazel.build/versions/master/be/workspace.html#http_file) | **`@protoc_gen_grpc_java_linux_x86_64`** | [sha256:4229579f6e2b](https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.6.1/protoc-gen-grpc-java-1.6.1-linux-x86_64.exe) |
35+
| [http_file](https://docs.bazel.build/versions/master/be/workspace.html#http_file) | **`@protoc_gen_grpc_java_macosx`** | [sha256:9e3515e22e23](https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.6.1/protoc-gen-grpc-java-1.6.1-osx-x86_64.exe) |
36+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@junit_junit_4`** | [junit:junit:jar:4.12](http:repo1.maven.org/maven2/junit/junit/jar) (2973d1) |
37+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_api_grpc_proto_google_common_protos`** | [com.google.api.grpc:proto-google-common-protos:0.1.9](http:repo1.maven.org/maven2/com/google/api/grpc/proto-google-common-protos/0.1.9) (3760f6) |
38+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_code_findbugs_jsr305`** | [com.google.code.findbugs:jsr305:3.0.0](http:repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.0) (5871fb) |
39+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_code_gson_gson`** | [com.google.code.gson:gson:2.7](http:repo1.maven.org/maven2/com/google/code/gson/gson/2.7) (751f54) |
40+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_errorprone_error_prone_annotations`** | [com.google.errorprone:error_prone_annotations:2.0.11](http:repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.0.11) (3624d8) |
41+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_guava_guava`** | [com.google.guava:guava:19.0](http:repo1.maven.org/maven2/com/google/guava/guava/19.0) (6ce200) |
42+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_instrumentation_instrumentation_api`** | [com.google.instrumentation:instrumentation-api:0.4.3](http:repo1.maven.org/maven2/com/google/instrumentation/instrumentation-api/0.4.3) (41614a) |
43+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_protobuf_protobuf_java`** | [com.google.protobuf:protobuf-java:3.4.0](http:repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.4.0) (b32aba) |
44+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@com_google_protobuf_protobuf_java_util`** | [com.google.protobuf:protobuf-java-util:3.3.1](http:repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.3.1) (35d048) |
45+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_context`** | [io.grpc:grpc-context:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-context/1.6.1) (9c52ae) |
46+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_core`** | [io.grpc:grpc-core:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-core/1.6.1) (871c93) |
47+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_netty`** | [io.grpc:grpc-netty:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-netty/1.6.1) (6941e4) |
48+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_protobuf`** | [io.grpc:grpc-protobuf:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-protobuf/1.6.1) (a309df) |
49+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_protobuf_lite`** | [io.grpc:grpc-protobuf-lite:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.6.1) (124bca) |
50+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_grpc_grpc_stub`** | [io.grpc:grpc-stub:1.6.1](http:repo1.maven.org/maven2/io/grpc/grpc-stub/1.6.1) (f32b7a) |
51+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_buffer`** | [io.netty:netty-buffer:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-buffer/4.1.14.Final) (71f0a7) |
52+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_codec`** | [io.netty:netty-codec:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-codec/4.1.14.Final) (b8573a) |
53+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_codec_http`** | [io.netty:netty-codec-http:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.14.Final) (f287b5) |
54+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_codec_http2`** | [io.netty:netty-codec-http2:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.14.Final) (00d2af) |
55+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_codec_socks`** | [io.netty:netty-codec-socks:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-codec-socks/4.1.14.Final) (b8d856) |
56+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_common`** | [io.netty:netty-common:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-common/4.1.14.Final) (230ff0) |
57+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_handler`** | [io.netty:netty-handler:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-handler/4.1.14.Final) (626a48) |
58+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_handler_proxy`** | [io.netty:netty-handler-proxy:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-handler-proxy/4.1.14.Final) (9dbedd) |
59+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_resolver`** | [io.netty:netty-resolver:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-resolver/4.1.14.Final) (f91e01) |
60+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_netty_netty_transport`** | [io.netty:netty-transport:4.1.14.Final](http:repo1.maven.org/maven2/io/netty/netty-transport/4.1.14.Final) (3ed647) |
61+
| [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) | **`@io_opencensus_opencensus_api`** | [io.opencensus:opencensus-api:0.5.1](http:repo1.maven.org/maven2/io/opencensus/opencensus-api/0.5.1) (cbd0a7) |
62+
63+
## C#
64+
65+
| Rule | Workspace | Detail |
66+
| ---: | :--- | :--- |
67+
| [new_nuget_package](https://github.com/bazelbuild/rules_dotnet#new_nuget_package) | **`@nuget_google_protobuf`** | [Google.Protobuf@3.4.0](https://www.nuget.org/packages/Google.Protobuf) |
68+
| [new_nuget_package](https://github.com/bazelbuild/rules_dotnet#new_nuget_package) | **`@nuget_grpc`** | [Grpc@1.6.0](https://www.nuget.org/packages/Grpc) |
69+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protoc_gen_grpc_csharp`** | `//external:protoc_gen_grpc_csharp` (`@com_google_grpc//:grpc_csharp_plugin`) |
70+
71+
## Go
72+
73+
| Rule | Workspace | Detail |
74+
| ---: | :--- | :--- |
75+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@org_golang_google_grpc`** | [google.golang.org/grpc](https://google.golang.org/grpc/) |
76+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@org_golang_google_genproto`** | [google.golang.org/genproto](https://google.golang.org/genproto/) |
77+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@org_golang_x_net`** | [golang.org/x/net](https://golang.org/x/net/) |
78+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@org_golang_x_text`** | [golang.org/x/text](https://golang.org/x/text/) |
79+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@com_github_golang_glog`** | [github.com/golang/glog](https://github.com/golang/glog/) |
80+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@com_github_golang_protobuf`** | [github.com/golang/protobuf](https://github.com/golang/protobuf/) |
81+
82+
## Gogo
83+
84+
| Rule | Workspace | Detail |
85+
| ---: | :--- | :--- |
86+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@com_github_gogo_protobuf`** | [github.com/gogo/protobuf](https://github.com/gogo/protobuf/) |
87+
88+
## Grpc Gateway
89+
90+
| Rule | Workspace | Detail |
91+
| ---: | :--- | :--- |
92+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@com_github_grpc_ecosystem_grpc_gateway`** | [github.com/grpc-ecosystem/grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway/) |
93+
| [new_http_archive](https://docs.bazel.build/versions/master/be/workspace.html#new_http_archive) | **`@com_github_grpc_ecosystem_grpc_gateway_googleapis`** | [sha256:b8426c25492e](https://github.com/grpc-ecosystem/grpc-gateway/archive/f2862b476edcef83412c7af8687c9cd8e4097c0f.zip) |
94+
| [go_repository](https://github.com/bazelbuild/rules_go#go_repository) | **`@org_golang_google_genproto`** | [google.golang.org/genproto](https://google.golang.org/genproto/) |
95+
96+
## Node
97+
98+
| Rule | Workspace | Detail |
99+
| ---: | :--- | :--- |
100+
| [bind](https://docs.bazel.build/versions/master/be/workspace.html#bind) | **`@protoc_gen_grpc_node`** | `//external:protoc_gen_grpc_node` (`@com_google_grpc//:grpc_node_plugin`) |
101+
| [npm_repository](https://github.com/pubref/rules_node#npm_repository) | **`@npm_protobuf_stack`** | [async@1.5.2](https://npmjs.org/package/async), [google-protobuf@3.1.1](https://npmjs.org/package/google-protobuf), [lodash@4.6.1](https://npmjs.org/package/lodash), [minimist@1.2.0](https://npmjs.org/package/minimist) |
102+
| [npm_repository](https://github.com/pubref/rules_node#npm_repository) | **`@npm_grpc`** | [grpc@1.0.0](https://npmjs.org/package/grpc) |

0 commit comments

Comments
 (0)