Bump protobuf dependency to 3.0.0-beta-3
This allows us to play with zero-copy and proto3 support for lite.
Unfortunately, it introduced some warnings, so deprecated warnings are
now ignored for benchmarks and interop-testing.
diff --git a/compiler/Dockerfile b/compiler/Dockerfile
index e25f285..a51aaca 100644
--- a/compiler/Dockerfile
+++ b/compiler/Dockerfile
@@ -2,7 +2,7 @@
RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \
git fetch && \
- git checkout v3.0.0-beta-2 && \
+ git checkout v3.0.0-beta-3 && \
./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \
make clean && make -j$(nproc) && make -j$(nproc) install"'
diff --git a/compiler/README.md b/compiler/README.md
index d09a70b..2cd1aee 100644
--- a/compiler/README.md
+++ b/compiler/README.md
@@ -13,7 +13,7 @@
* Linux, Mac OS X with Clang, or Windows with MSYS2
* Java 7 or up
-* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-2 or up
+* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-3 or up
## Compiling and testing the codegen
Change to the `compiler` directory:
@@ -37,6 +37,11 @@
$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \
--grpc-java_out="$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
```
+To generate Java interfaces with protobuf lite:
+```
+$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \
+ --grpc-java_out=lite:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
+```
To generate Java interfaces with protobuf nano:
```
$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \
diff --git a/compiler/build.gradle b/compiler/build.gradle
index c9b7c56..e368c36 100644
--- a/compiler/build.gradle
+++ b/compiler/build.gradle
@@ -125,7 +125,11 @@
}
sourceSets {
- testLite {}
+ testLite {
+ proto {
+ setSrcDirs(['src/test/proto'])
+ }
+ }
testNano {
proto {
setSrcDirs(['src/test/proto'])
@@ -136,7 +140,7 @@
compileTestLiteJava {
// Protobuf-generated Lite produces quite a few warnings.
options.compilerArgs = compileTestJava.options.compilerArgs +
- ["-Xlint:-unchecked", "-Xlint:-rawtypes"]
+ ["-Xlint:-unchecked", "-Xlint:-rawtypes", "-Xlint:-fallthrough"]
}
compileTestNanoJava {
diff --git a/compiler/src/testLite/proto/test.proto b/compiler/src/testLite/proto/test.proto
deleted file mode 100644
index d2a1fd5..0000000
--- a/compiler/src/testLite/proto/test.proto
+++ /dev/null
@@ -1,55 +0,0 @@
-// A simple service definition for testing the protoc plugin.
-syntax = "proto2";
-
-package grpc.testing;
-
-option java_package = "io.grpc.testing.integration";
-option optimize_for = LITE_RUNTIME;
-
-message SimpleRequest {
-}
-
-message SimpleResponse {
-}
-
-message StreamingInputCallRequest {
-}
-
-message StreamingInputCallResponse {
-}
-
-message StreamingOutputCallRequest {
-}
-
-message StreamingOutputCallResponse {
-}
-
-// Test service that supports all call types.
-service TestService {
- // One request followed by one response.
- // The server returns the client payload as-is.
- rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
-
- // One request followed by a sequence of responses (streamed download).
- // The server returns the payload with client desired type and sizes.
- rpc StreamingOutputCall(StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by one response (streamed upload).
- // The server returns the aggregated size of client payload as the result.
- rpc StreamingInputCall(stream StreamingInputCallRequest)
- returns (StreamingInputCallResponse);
-
- // A sequence of requests with each request served by the server immediately.
- // As one request could lead to multiple responses, this interface
- // demonstrates the idea of full bidirectionality.
- rpc FullBidiCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by a sequence of responses.
- // The server buffers all the client requests and then serves them in order. A
- // stream of responses are returned to the client when the server starts with
- // first request.
- rpc HalfBidiCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-}