Upgrade to protobuf-3.0.0-beta-2 and protobuf-nano-3.0.0-alpha-5

Update option name that disables protobuf tests.
This commit is contained in:
Kun Zhang 2016-01-27 08:26:19 -08:00
parent b7c4e18dcd
commit e2ed2e8f03
20 changed files with 37 additions and 32 deletions

View File

@ -4,7 +4,7 @@ language: java
env: env:
global: global:
- PROTOBUF_VERSION=3.0.0-beta-1 - PROTOBUF_VERSION=3.0.0-beta-2
- OPENSSL_VERSION=1.0.2d - OPENSSL_VERSION=1.0.2d
- LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib - LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
- CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include - CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include

View File

@ -27,13 +27,13 @@ This section is only necessary if you are making changes to the code
generation. Most users only need to use `skipCodegen=true` as discussed above. generation. Most users only need to use `skipCodegen=true` as discussed above.
### Build Protobuf ### Build Protobuf
The codegen plugin is C++ code and requires protobuf 3.0.0-beta-1. The codegen plugin is C++ code and requires protobuf 3.0.0-beta-2.
For Linux, Mac and MinGW: 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.0-beta-1 $ git checkout v3.0.0-beta-2
$ ./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.0-beta-1\src ^ -PvcProtobufInclude=C:\path\to\protobuf-3.0.0-beta-2\src ^
-PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-1\vsprojects\Release ^ -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-2\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.0-beta-1\\src vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-beta-2\\src
vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-1\\vsprojects\\Release vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-2\\vsprojects\\Release
targetArch=x86_32 targetArch=x86_32
``` ```

View File

@ -90,7 +90,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
protobuf-java directly, you will be transitively depending on the protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on. protobuf-java version that grpc depends on.
--> -->
<protocArtifact>com.google.protobuf:protoc:3.0.0-beta-1:exe:${os.detected.classifier}</protocArtifact> <protocArtifact>com.google.protobuf:protoc:3.0.0-beta-2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId> <pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:0.9.0:exe:${os.detected.classifier}</pluginArtifact> <pluginArtifact>io.grpc:protoc-gen-grpc-java:0.9.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration> </configuration>
@ -129,7 +129,7 @@ protobuf {
// The version of protoc must match protobuf-java. If you don't depend on // 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 directly, you will be transitively depending on the
// protobuf-java version that grpc depends on. // protobuf-java version that grpc depends on.
artifact = "com.google.protobuf:protoc:3.0.0-beta-1" artifact = "com.google.protobuf:protoc:3.0.0-beta-2"
} }
plugins { plugins {
grpc { grpc {

View File

@ -28,7 +28,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-beta-1' artifact = 'com.google.protobuf:protoc:3.0.0-beta-2'
} }
plugins { plugins {
grpc { grpc {

View File

@ -50,7 +50,7 @@ public final class ClientConfig extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
serverTargets_ = new com.google.protobuf.LazyStringArrayList(); serverTargets_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001; mutable_bitField0_ |= 0x00000001;

View File

@ -54,8 +54,8 @@ subprojects {
protocPluginBaseName = 'protoc-gen-grpc-java' protocPluginBaseName = 'protoc-gen-grpc-java'
javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"
protobufVersion = '3.0.0-beta-1' protobufVersion = '3.0.0-beta-2'
protobufNanoVersion = '3.0.0-alpha-4' protobufNanoVersion = '3.0.0-alpha-5'
configureProtoCompilation = { configureProtoCompilation = {
String generatedSourcePath = "${projectDir}/src/generated" String generatedSourcePath = "${projectDir}/src/generated"

View File

@ -13,5 +13,5 @@ cd "%WORKSPACE%"
set ESCWORKSPACE=%WORKSPACE:\=\\% set ESCWORKSPACE=%WORKSPACE:\=\\%
echo targetArch=x86_32> gradle.properties echo targetArch=x86_32> gradle.properties
echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-1\\cmake\\build\\Release>> gradle.properties echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\Release>> gradle.properties
echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-1\\cmake\\build\\include>> gradle.properties echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\include>> gradle.properties

View File

@ -5,7 +5,7 @@ REM Prerequisite:
REM 7za.exe in current directory or PATH REM 7za.exe in current directory or PATH
REM Install http://slproweb.com/download/Win64OpenSSL_Light-1_0_2d.exe REM Install http://slproweb.com/download/Win64OpenSSL_Light-1_0_2d.exe
set PROTOBUF_VER=3.0.0-beta-1 set PROTOBUF_VER=3.0.0-beta-2
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\" (
@ -26,10 +26,10 @@ set PATH=%PATH%;%cd%\%CMAKE_NAME%\bin
powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }" powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }"
7za X protobuf.zip 7za X protobuf.zip
del protobuf.zip del protobuf.zip
pushd protobuf-3.0.0-beta-1\cmake pushd protobuf-3.0.0-beta-2\cmake
mkdir build mkdir build
cd build cd build
cmake -DBUILD_TESTING=OFF .. cmake -Dprotobuf_BUILD_TESTS=OFF ..
msbuild /maxcpucount /p:Configuration=Release libprotoc.vcxproj msbuild /maxcpucount /p:Configuration=Release libprotoc.vcxproj
call extract_includes.bat call extract_includes.bat
popd popd

View File

@ -7,6 +7,11 @@ DOWNLOAD_DIR=/tmp/source
INSTALL_DIR=/tmp/protobuf-${PROTOBUF_VERSION} INSTALL_DIR=/tmp/protobuf-${PROTOBUF_VERSION}
mkdir -p $DOWNLOAD_DIR mkdir -p $DOWNLOAD_DIR
# We may have set this elsewhere in order to allow gRPC find our custom
# built openssl to run ALPN, but it may be incompatible with wget which
# uses the system openssl. We unset this variable for this script.
export -n LD_LIBRARY_PATH
# Make protoc # Make protoc
# Can't check for presence of directory as cache auto-creates it. # Can't check for presence of directory as cache auto-creates it.
if [ -f ${INSTALL_DIR}/bin/protoc ]; then if [ -f ${INSTALL_DIR}/bin/protoc ]; then

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.0-beta-1 && \ git checkout v3.0.0-beta-2 && \
./autogen.sh && \ ./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 -j$(nproc) && \ CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 -j$(nproc) && \
make clean && make && make install"' make clean && make && make install"'

View File

@ -13,7 +13,7 @@ build your own codegen.
* Linux, Mac OS X with Clang, or Windows with MSYS2 * Linux, Mac OS X with Clang, or Windows with MSYS2
* Java 7 or up * Java 7 or up
* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-1 or up * [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-2 or up
## Compiling and testing the codegen ## Compiling and testing the codegen
Change to the `compiler` directory: Change to the `compiler` directory:

View File

@ -25,7 +25,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-beta-1' artifact = 'com.google.protobuf:protoc:3.0.0-beta-2'
} }
plugins { plugins {
grpc { grpc {

View File

@ -47,7 +47,7 @@ public final class HelloRequest extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
name_ = s; name_ = s;
break; break;

View File

@ -47,7 +47,7 @@ public final class HelloResponse extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
message_ = s; message_ = s;
break; break;

View File

@ -48,7 +48,7 @@ public final class Feature extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
name_ = s; name_ = s;
break; break;

View File

@ -60,7 +60,7 @@ public final class RouteNote extends
break; break;
} }
case 18: { case 18: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
message_ = s; message_ = s;
break; break;

View File

@ -43,7 +43,7 @@ public final class InitialLoadBalanceRequest extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
name_ = s; name_ = s;
break; break;

View File

@ -42,7 +42,7 @@ public final class InitialLoadBalanceResponse extends
break; break;
} }
case 18: { case 18: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
initialResponseTypeCase_ = 2; initialResponseTypeCase_ = 2;
initialResponseType_ = s; initialResponseType_ = s;
break; break;

View File

@ -46,7 +46,7 @@ public final class Server extends
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
ipAddress_ = s; ipAddress_ = s;
break; break;
@ -57,7 +57,7 @@ public final class Server extends
break; break;
} }
case 26: { case 26: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
loadBalanceToken_ = s; loadBalanceToken_ = s;
break; break;

View File

@ -1738,13 +1738,13 @@ public final class Messages {
break; break;
} }
case 18: { case 18: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
username_ = s; username_ = s;
break; break;
} }
case 26: { case 26: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
oauthScope_ = s; oauthScope_ = s;
break; break;
@ -2583,7 +2583,7 @@ public final class Messages {
break; break;
} }
case 10: { case 10: {
String s = input.readStringRequireUtf8(); java.lang.String s = input.readStringRequireUtf8();
value_ = s; value_ = s;
break; break;