diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/Descriptor.cs | 7 | ||||
-rwxr-xr-x | generate_changelog.py | 1 | ||||
-rwxr-xr-x | objectivec/DevTools/full_mac_build.sh | 27 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.pb.cc | 9 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.proto | 2 | ||||
-rw-r--r-- | src/google/protobuf/generated_message_reflection.h | 8 | ||||
-rwxr-xr-x | tests.sh | 29 |
9 files changed, 55 insertions, 32 deletions
diff --git a/.travis.yml b/.travis.yml index bd9a5dfb..a34cb83b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ language: cpp os: - osx # The Objective C build needs Xcode 7.0 or later. -osx_image: xcode8 +osx_image: xcode8.1 script: - ./tests.sh $CONFIG env: @@ -1,7 +1,7 @@ Protocol Buffers - Google's data interchange format =================================================== -[![Build Status](https://travis-ci.org/google/protobuf.svg?branch=master)](https://travis-ci.org/google/protobuf) [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) [![Build Status](https://grpc-testing.appspot.com/buildStatus/icon?job=protobuf_branch)](https://grpc-testing.appspot.com/job/protobuf_branch) [![Build Status](https://grpc-testing.appspot.com/job/protobuf_branch_32/badge/icon)](https://grpc-testing.appspot.com/job/protobuf_branch_32) +[![Build Status](https://travis-ci.org/google/protobuf.svg?branch=master)](https://travis-ci.org/google/protobuf) [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) [![Build Status](https://grpc-testing.appspot.com/buildStatus/icon?job=protobuf_branch)](https://grpc-testing.appspot.com/job/protobuf_branch) [![Build Status](https://grpc-testing.appspot.com/job/protobuf_branch_32/badge/icon)](https://grpc-testing.appspot.com/job/protobuf_branch_32) [![Build Status](http://ci.bazel.io/buildStatus/icon?job=protobuf)](http://ci.bazel.io/job/protobuf/) Copyright 2008 Google Inc. diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs index decc0b06..52f97b96 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs @@ -142,9 +142,10 @@ namespace Google.Protobuf.Reflection { "CmFubm90YXRpb24YASADKAsyLS5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVk", "Q29kZUluZm8uQW5ub3RhdGlvbhpPCgpBbm5vdGF0aW9uEhAKBHBhdGgYASAD", "KAVCAhABEhMKC3NvdXJjZV9maWxlGAIgASgJEg0KBWJlZ2luGAMgASgFEgsK", - "A2VuZBgEIAEoBUJYChNjb20uZ29vZ2xlLnByb3RvYnVmQhBEZXNjcmlwdG9y", - "UHJvdG9zSAFaCmRlc2NyaXB0b3KiAgNHUEKqAhpHb29nbGUuUHJvdG9idWYu", - "UmVmbGVjdGlvbg==")); + "A2VuZBgEIAEoBUKMAQoTY29tLmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRv", + "clByb3Rvc0gBWj5naXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wcm90b2Mt", + "Z2VuLWdvL2Rlc2NyaXB0b3I7ZGVzY3JpcHRvcqICA0dQQqoCGkdvb2dsZS5Q", + "cm90b2J1Zi5SZWZsZWN0aW9u")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/generate_changelog.py b/generate_changelog.py index d7575d46..d90a9b70 100755 --- a/generate_changelog.py +++ b/generate_changelog.py @@ -57,6 +57,7 @@ previous = sys.argv[1] for language in languages: print(language.name) + sys.stdout.flush() os.system(("git log --pretty=oneline --abbrev-commit %s...HEAD %s | " + "sed -e 's/^/ - /'") % (previous, " ".join(language.pathspec))) print("") diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index 7b335618..ef8fb740 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -45,6 +45,8 @@ OPTIONS: Skip the invoke of Xcode to test the runtime on OS X. --skip-objc-conformance Skip the Objective C conformance tests (run on OS X). + --xcode-quiet + Pass -quiet to xcodebuild. EOF } @@ -83,6 +85,7 @@ DO_XCODE_OSX_TESTS=yes DO_XCODE_DEBUG=yes DO_XCODE_RELEASE=yes DO_OBJC_CONFORMANCE_TESTS=yes +XCODE_QUIET=no while [[ $# != 0 ]]; do case "${1}" in -h | --help ) @@ -124,6 +127,9 @@ while [[ $# != 0 ]]; do --skip-objc-conformance ) DO_OBJC_CONFORMANCE_TESTS=no ;; + --xcode-quiet ) + XCODE_QUIET=yes + ;; -*) echo "ERROR: Unknown option: ${1}" 1>&2 printUsage @@ -217,17 +223,21 @@ if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*. exit 1 fi +readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" +readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. + if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then XCODEBUILD_TEST_BASE_IOS=( xcodebuild -project objectivec/ProtocolBuffers_iOS.xcodeproj -scheme ProtocolBuffers ) + if [[ "${XCODE_QUIET}" == "yes" ]] ; then + XCODEBUILD_TEST_BASE_IOS+=( -quiet ) + fi # Don't need to worry about form factors or retina/non retina; # just pick a mix of OS Versions and 32/64 bit. # NOTE: Different Xcode have different simulated hardware/os support. - readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" - readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. case "${XCODE_VERSION}" in 6.* ) echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 @@ -247,6 +257,14 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit ) ;; + 8.1* ) + XCODEBUILD_TEST_BASE_IOS+=( + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=10.1" # 64bit + -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.1" # 64bit + ) + ;; * ) echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}" exit 2 @@ -271,8 +289,9 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported. -destination "platform=OS X,arch=x86_64" # 64bit ) - readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" - readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. + if [[ "${XCODE_QUIET}" == "yes" ]] ; then + XCODEBUILD_TEST_BASE_OSX+=( -quiet ) + fi case "${XCODE_VERSION}" in 6.* ) echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 56e75fa4..7c72a5a1 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -734,12 +734,13 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto_impl() { "(\0132-.google.protobuf.GeneratedCodeInfo.A" "nnotation\032O\n\nAnnotation\022\020\n\004path\030\001 \003(\005B\002\020" "\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n" - "\003end\030\004 \001(\005BX\n\023com.google.protobufB\020Descr" - "iptorProtosH\001Z\ndescriptor\242\002\003GPB\252\002\032Google" - ".Protobuf.Reflection" + "\003end\030\004 \001(\005B\214\001\n\023com.google.protobufB\020Desc" + "riptorProtosH\001Z>github.com/golang/protob" + "uf/protoc-gen-go/descriptor;descriptor\242\002" + "\003GPB\252\002\032Google.Protobuf.Reflection" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 5500); + descriptor, 5553); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto); diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto index eae31601..03aba076 100644 --- a/src/google/protobuf/descriptor.proto +++ b/src/google/protobuf/descriptor.proto @@ -40,7 +40,7 @@ syntax = "proto2"; package google.protobuf; -option go_package = "descriptor"; +option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; option csharp_namespace = "Google.Protobuf.Reflection"; diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index ea97a7c8..2633ab62 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -660,14 +660,14 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL : public Refl // choose 16 rather than some other number just in case the compiler would // be confused by an unaligned pointer. #define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \ - static_cast<int>( \ - reinterpret_cast<const char*>( \ - &reinterpret_cast<const TYPE*>(16)->FIELD) - \ + static_cast< ::google::protobuf::uint32>( \ + reinterpret_cast<const char*>( \ + &reinterpret_cast<const TYPE*>(16)->FIELD) - \ reinterpret_cast<const char*>(16)) #endif #define PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ONEOF, FIELD) \ - static_cast< ::google::protobuf::uint32>( \ + static_cast< ::google::protobuf::uint32>( \ reinterpret_cast<const char*>(&(ONEOF->FIELD)) \ - reinterpret_cast<const char*>(ONEOF)) @@ -38,11 +38,21 @@ build_cpp() { make check -j2 cd conformance && make test_cpp && cd .. - # Verify benchmarking code can build successfully. - git submodule init - git submodule update - cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../.. - cd benchmarks && make && ./generate-datasets && cd .. + # The benchmark code depends on cmake, so test if it is installed before + # trying to do the build. + # NOTE: The travis macOS images say they have cmake, but the xcode8.1 image + # appears to be missing it: https://github.com/travis-ci/travis-ci/issues/6996 + if [[ $(type cmake 2>/dev/null) ]]; then + # Verify benchmarking code can build successfully. + git submodule init + git submodule update + cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../.. + cd benchmarks && make && ./generate-datasets && cd .. + else + echo "" + echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed." + echo "" + fi } build_cpp_distcheck() { @@ -265,15 +275,6 @@ build_objectivec_osx() { } build_objectivec_cocoapods_integration() { - # First, load the RVM environment in bash, needed to update ruby. - source ~/.rvm/scripts/rvm - # Update rvm to the latest version. This is needed to solve - # https://github.com/google/protobuf/issues/1786 and may not be needed in the - # future when Travis updates the default version of rvm. - rvm get head - # Update ruby to 2.2.3 as the default one crashes with segmentation faults - # when using pod. - rvm use 2.2.3 --install --binary --fuzzy # Update pod to the latest version. gem install cocoapods --no-ri --no-rdoc objectivec/Tests/CocoaPods/run_tests.sh |