Bump protobuf to 3.1.0

Also removed warnings about protoc version matching runtime, since this
is no longer supposed to be a problem (starting with 3.0.0-beta-4) and
all our tests ran fine when using protoc 3.0.2 with protobuf runtime
3.1.0.

Fixes #2316
This commit is contained in:
Eric Anderson 2016-10-24 14:59:24 -07:00
parent 483662e24d
commit c38611a230
11 changed files with 16 additions and 32 deletions

View File

@ -5,7 +5,7 @@ language: java
env: env:
global: global:
- GRADLE_OPTS=-Xmx512m - GRADLE_OPTS=-Xmx512m
- PROTOBUF_VERSION=3.0.2 - PROTOBUF_VERSION=3.1.0
- LDFLAGS=-L/tmp/protobuf/lib - LDFLAGS=-L/tmp/protobuf/lib
- CXXFLAGS=-I/tmp/protobuf/include - CXXFLAGS=-I/tmp/protobuf/include
- LD_LIBRARY_PATH=/tmp/protobuf/lib - LD_LIBRARY_PATH=/tmp/protobuf/lib

View File

@ -33,7 +33,7 @@ For Linux, Mac and MinGW:
``` ```
$ git clone https://github.com/google/protobuf.git $ git clone https://github.com/google/protobuf.git
$ cd protobuf $ cd protobuf
$ git checkout v3.0.2 $ git checkout v3.1.0
$ ./autogen.sh $ ./autogen.sh
$ ./configure $ ./configure
$ make $ make
@ -72,16 +72,16 @@ When building on Windows and VC++, you need to specify project properties for
Gradle to find protobuf: Gradle to find protobuf:
``` ```
.\gradlew install ^ .\gradlew install ^
-PvcProtobufInclude=C:\path\to\protobuf-3.0.2\src ^ -PvcProtobufInclude=C:\path\to\protobuf-3.1.0\src ^
-PvcProtobufLibs=C:\path\to\protobuf-3.0.2\vsprojects\Release ^ -PvcProtobufLibs=C:\path\to\protobuf-3.1.0\vsprojects\Release ^
-PtargetArch=x86_32 -PtargetArch=x86_32
``` ```
Since specifying those properties every build is bothersome, you can instead Since specifying those properties every build is bothersome, you can instead
create ``<project-root>\gradle.properties`` with contents like: create ``<project-root>\gradle.properties`` with contents like:
``` ```
vcProtobufInclude=C:\\path\\to\\protobuf-3.0.2\\src vcProtobufInclude=C:\\path\\to\\protobuf-3.1.0\\src
vcProtobufLibs=C:\\path\\to\\protobuf-3.0.2\\vsprojects\\Release vcProtobufLibs=C:\\path\\to\\protobuf-3.1.0\\vsprojects\\Release
targetArch=x86_32 targetArch=x86_32
``` ```

View File

@ -82,12 +82,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
<artifactId>protobuf-maven-plugin</artifactId> <artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version> <version>0.5.0</version>
<configuration> <configuration>
<!-- <protocArtifact>com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier}</protocArtifact>
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId> <pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}</pluginArtifact> <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}</pluginArtifact>
</configuration> </configuration>
@ -125,10 +120,7 @@ buildscript {
protobuf { protobuf {
protoc { protoc {
// The version of protoc must match protobuf-java. If you don't depend on artifact = "com.google.protobuf:protoc:3.1.0"
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
artifact = "com.google.protobuf:protoc:3.0.2"
} }
plugins { plugins {
grpc { grpc {

View File

@ -28,7 +28,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.2' artifact = 'com.google.protobuf:protoc:3.1.0'
} }
plugins { plugins {
grpc { grpc {

View File

@ -62,7 +62,7 @@ subprojects {
javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"
guavaVersion = '19.0' guavaVersion = '19.0'
protobufVersion = '3.0.2' protobufVersion = '3.1.0'
protobufNanoVersion = '3.0.0-alpha-5' protobufNanoVersion = '3.0.0-alpha-5'
configureProtoCompilation = { configureProtoCompilation = {

View File

@ -4,7 +4,7 @@ REM 7za is in http://www.7-zip.org/a/7z1507-extra.7z
REM Prerequisite: REM Prerequisite:
REM 7za.exe in current directory or PATH REM 7za.exe in current directory or PATH
set PROTOBUF_VER=3.0.2 set PROTOBUF_VER=3.1.0
set CMAKE_NAME=cmake-3.3.2-win32-x86 set CMAKE_NAME=cmake-3.3.2-win32-x86
if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" ( if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (

View File

@ -2,7 +2,7 @@ FROM protoc-artifacts:latest
RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \ RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \
git fetch && \ git fetch && \
git checkout v3.0.2 && \ git checkout v3.10 && \
./autogen.sh && \ ./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \ CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \
make clean && make -j$(nproc) && make -j$(nproc) install"' make clean && make -j$(nproc) && make -j$(nproc) install"'

View File

@ -27,7 +27,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.2' artifact = 'com.google.protobuf:protoc:3.1.0'
} }
plugins { plugins {
javalite { javalite {

View File

@ -25,7 +25,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.2' artifact = 'com.google.protobuf:protoc:3.1.0'
} }
plugins { plugins {
javalite { javalite {

View File

@ -32,10 +32,7 @@ dependencies {
protobuf { protobuf {
protoc { protoc {
// The version of protoc must match protobuf-java. If you don't depend on artifact = 'com.google.protobuf:protoc:3.1.0'
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
artifact = 'com.google.protobuf:protoc:3.0.2'
} }
plugins { plugins {
grpc { grpc {

View File

@ -43,12 +43,7 @@
<artifactId>protobuf-maven-plugin</artifactId> <artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version> <version>0.5.0</version>
<configuration> <configuration>
<!-- <protocArtifact>com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier}</protocArtifact>
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId> <pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration> </configuration>