diff options
44 files changed, 138 insertions, 529 deletions
diff --git a/.travis.yml b/.travis.yml index 99981466..74d4ea7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,21 +14,21 @@ matrix: - os: osx env: CONFIG=objectivec_osx - osx_image: xcode9.1 + osx_image: xcode9.3 language: objective-c # iOS build log was starting to choke travis UI, so split to cover the # Xcode Debug and Release Configurations independently. - os: osx env: CONFIG=objectivec_ios_debug - osx_image: xcode9.1 + osx_image: xcode9.3 language: objective-c - os: osx env: CONFIG=objectivec_ios_release - osx_image: xcode9.1 + osx_image: xcode9.3 language: objective-c - os: osx env: CONFIG=objectivec_cocoapods_integration - osx_image: xcode9.1 + osx_image: xcode9.3 language: objective-c # ----------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 82b8b8e3..48f2c034 100644 --- a/Makefile.am +++ b/Makefile.am @@ -552,25 +552,6 @@ objectivec_EXTRA_DIST= \ objectivec/Tests/GPBUtilitiesTests.m \ objectivec/Tests/GPBWellKnownTypesTest.m \ objectivec/Tests/GPBWireFormatTests.m \ - objectivec/Tests/iOSTestHarness/AppDelegate.m \ - objectivec/Tests/iOSTestHarness/en.lproj/InfoPlist.strings \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_20.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_29.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_40.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_58.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_60.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_76.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_80.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_87.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_120.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_152.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_167.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_180.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_1024.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json \ - objectivec/Tests/iOSTestHarness/Images.xcassets/LaunchImage.launchimage/Contents.json \ - objectivec/Tests/iOSTestHarness/Info.plist \ - objectivec/Tests/iOSTestHarness/LaunchScreen.xib \ objectivec/Tests/text_format_map_unittest_data.txt \ objectivec/Tests/text_format_unittest_data.txt \ objectivec/Tests/unittest_cycle.proto \ diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index b84e40af..564fdab3 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -132,7 +132,7 @@ javac_middleman: $(java_benchmark_testing_files) protoc_middleman protoc_middlem java-benchmark: javac_middleman @echo "Writing shortcut script java-benchmark..." - @echo '#! /bin/sh' > java-benchmark + @echo '#! /bin/bash' > java-benchmark @echo 'all_data=""' >> java-benchmark @echo 'conf=()' >> java-benchmark @echo 'data_files=""' >> java-benchmark @@ -178,7 +178,7 @@ nodist_libbenchmark_messages_la_SOURCES = \ python-pure-python-benchmark: python_add_init @echo "Writing shortcut script python-pure-python-benchmark..." - @echo '#! /bin/sh' > python-pure-python-benchmark + @echo '#! /bin/bash' > python-pure-python-benchmark @echo export LD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-pure-python-benchmark @echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-pure-python-benchmark @echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'python\' >> python-pure-python-benchmark @@ -188,7 +188,7 @@ python-pure-python-benchmark: python_add_init python-cpp-reflection-benchmark: python_add_init @echo "Writing shortcut script python-cpp-reflection-benchmark..." - @echo '#! /bin/sh' > python-cpp-reflection-benchmark + @echo '#! /bin/bash' > python-cpp-reflection-benchmark @echo export LD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-cpp-reflection-benchmark @echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-cpp-reflection-benchmark @echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'cpp\' >> python-cpp-reflection-benchmark @@ -198,7 +198,7 @@ python-cpp-reflection-benchmark: python_add_init python-cpp-generated-code-benchmark: python_add_init libbenchmark_messages.la @echo "Writing shortcut script python-cpp-generated-code-benchmark..." - @echo '#! /bin/sh' > python-cpp-generated-code-benchmark + @echo '#! /bin/bash' > python-cpp-generated-code-benchmark @echo export LD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-cpp-generated-code-benchmark @echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/libprotobuf.la >> python-cpp-generated-code-benchmark @echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'cpp\' >> python-cpp-generated-code-benchmark @@ -253,7 +253,7 @@ go_protoc_middleman: make_tmp_dir $(top_srcdir)/src/protoc$(EXEEXT) $(benchmarks go-benchmark: go_protoc_middleman @echo "Writing shortcut script go-benchmark..." - @echo '#! /bin/sh' > go-benchmark + @echo '#! /bin/bash' > go-benchmark @echo 'cd $(srcdir)/go' >> go-benchmark @echo 'all_data=""' >> go-benchmark @echo 'conf=()' >> go-benchmark @@ -409,7 +409,7 @@ gogoslick_protoc_middleman: make_tmp_dir_gogo $(top_srcdir)/src/protoc$(EXEEXT) gogo_data = $$(find . -type f -name "dataset.*.pb" -path "./tmp/*") generate-gogo-benchmark-code: - @echo '#! /bin/sh' > generate-gogo-benchmark-code + @echo '#! /bin/bash' > generate-gogo-benchmark-code @echo 'cp $(srcdir)/go/go_benchmark_test.go tmp/$$1/benchmark_code/$$1_benchmark1_test.go' >> generate-gogo-benchmark-code @echo 'sed -i -e "s/\.\.\/tmp/../g" tmp/$$1/benchmark_code/$$1_benchmark1_test.go' >> generate-gogo-benchmark-code @echo 'sed -i -e "s/b\.Run(\"\(.*\)\"/b.Run(\"\1\_$$1\"/g" tmp/$$1/benchmark_code/$$1_benchmark1_test.go' >> generate-gogo-benchmark-code @@ -424,7 +424,7 @@ generate_all_gogo_benchmark_code: generate-gogo-benchmark-code make_tmp_dir_gogo gogo-benchmark: @echo "Writing shortcut script gogo-benchmark..." - @echo '#! /bin/sh' > gogo-benchmark + @echo '#! /bin/bash' > gogo-benchmark @echo 'cd tmp/$$1/benchmark_code' >> gogo-benchmark @echo 'shift' >> gogo-benchmark @echo 'all_data=""' >> gogo-benchmark diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index fca4da33..02174e96 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,5 +1,5 @@ # Minimum CMake required -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1.3) if(protobuf_VERBOSE) message(STATUS "Protocol Buffers Configuring...") @@ -15,8 +15,14 @@ endif() # Project project(protobuf C CXX) -# Add c++11 flags for clang -set(CMAKE_CXX_FLAGS "-std=c++11") +# Add c++11 flags +if (CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") +else() + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) +endif() # Options option(protobuf_BUILD_TESTS "Build tests" ON) @@ -161,7 +167,7 @@ if (MSVC) string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR}) configure_file(extract_includes.bat.in extract_includes.bat) - + # Suppress linker warnings about files with no symbols defined. set(CMAKE_STATIC_LINKER_FLAGS /ignore:4221) endif (MSVC) diff --git a/csharp/README.md b/csharp/README.md index 436248bb..9d1225f1 100644 --- a/csharp/README.md +++ b/csharp/README.md @@ -41,6 +41,12 @@ in its implementation, as well as the new Visual Studio 2017 csproj format. These features have no impact when using the compiled code - they're only relevant when building the `Google.Protobuf` assembly. +In order to run and debug the AddressBook example in the IDE, you must +install the optional component, ".Net Core 1.0 - 1.1 development tools +for Web" (as it's labelled in current versions of the VS2017 +installer), above and beyond the main .NET Core cross-platform +development feature. + Testing ======= diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs index 9124beee..be94cb10 100644 --- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs @@ -30,6 +30,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endregion +using Google.Protobuf.WellKnownTypes; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -43,6 +44,16 @@ namespace Google.Protobuf.Reflection /// </summary> public sealed class FileDescriptor : IDescriptor { + // Prevent linker failures when using IL2CPP with the well-known types. + static FileDescriptor() + { + ForceReflectionInitialization<Syntax>(); + ForceReflectionInitialization<NullValue>(); + ForceReflectionInitialization<Field.Types.Cardinality>(); + ForceReflectionInitialization<Field.Types.Kind>(); + ForceReflectionInitialization<Value.KindOneofCase>(); + } + private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedClrTypeInfo generatedCodeInfo) { SerializedData = descriptorData; @@ -334,5 +345,18 @@ namespace Google.Protobuf.Reflection /// The (possibly empty) set of custom options for this file. /// </summary> public CustomOptions CustomOptions => Proto.Options?.CustomOptions ?? CustomOptions.Empty; + + /// <summary> + /// Performs initialization for the given generic type argument. + /// </summary> + /// <remarks> + /// This method is present for the sake of AOT compilers. It allows code (whether handwritten or generated) + /// to make calls into the reflection machinery of this library to express an intention to use that type + /// reflectively (e.g. for JSON parsing and formatting). The call itself does almost nothing, but AOT compilers + /// attempting to determine which generic type arguments need to be handled will spot the code path and act + /// accordingly. + /// </remarks> + /// <typeparam name="T">The type to force initialization for.</typeparam> + public static void ForceReflectionInitialization<T>() => ReflectionUtil.ForceInitialize<T>(); } } diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index 80d5c774..18a70b80 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -50,6 +50,29 @@ namespace Google.Protobuf.Reflection /// </summary> internal static class ReflectionUtil { + static ReflectionUtil() + { + ForceInitialize<string>(); // Handles all reference types + ForceInitialize<int>(); + ForceInitialize<long>(); + ForceInitialize<uint>(); + ForceInitialize<ulong>(); + ForceInitialize<float>(); + ForceInitialize<double>(); + ForceInitialize<bool>(); + ForceInitialize<int?>(); + ForceInitialize<long?>(); + ForceInitialize<uint?>(); + ForceInitialize<ulong?>(); + ForceInitialize<float?>(); + ForceInitialize<double?>(); + ForceInitialize<bool?>(); + ForceInitialize<SampleEnum>(); + SampleEnumMethod(); + } + + internal static void ForceInitialize<T>() => new ReflectionHelper<IMessage, T>(); + /// <summary> /// Empty Type[] used when calling GetProperty to force property instead of indexer fetching. /// </summary> @@ -163,7 +186,6 @@ namespace Google.Protobuf.Reflection { try { - PreventLinkerFailures(); // Try to do the conversion using reflection, so we can see whether it's supported. MethodInfo method = typeof(ReflectionUtil).GetMethod(nameof(SampleEnumMethod)); // If this passes, we're in a reasonable runtime. @@ -176,23 +198,6 @@ namespace Google.Protobuf.Reflection } } - /// <summary> - /// This method is effectively pointless, but only called once. It's present (and called) - /// to avoid the Unity linker from removing code that's only called via reflection. - /// </summary> - private static void PreventLinkerFailures() - { - // Exercise the method directly. This should avoid any pro-active linkers from stripping - // the method out. - SampleEnum x = SampleEnumMethod(); - if (x != SampleEnum.X) - { - throw new InvalidOperationException("Failure in reflection utilities"); - } - // Make sure the ReflectionHelper parameterless constructor isn't removed... - var helper = new ReflectionHelper<int, int>(); - } - public enum SampleEnum { X diff --git a/docs/third_party.md b/docs/third_party.md index 1b03b9ff..3f267dde 100644 --- a/docs/third_party.md +++ b/docs/third_party.md @@ -124,6 +124,7 @@ GRPC (http://www.grpc.io/) is Google's RPC implementation for Protocol Buffers. * https://github.com/tony612/grpc-elixir (Elixir) * https://github.com/johanbrandhorst/protobuf (GopherJS) * https://github.com/awakesecurity/gRPC-haskell (Haskell) +* https://github.com/Yeolar/raster (C++) ## Other Utilities diff --git a/kokoro/linux/benchmark/build.sh b/kokoro/linux/benchmark/build.sh index 2f7f4f3f..750c3e5c 100755 --- a/kokoro/linux/benchmark/build.sh +++ b/kokoro/linux/benchmark/build.sh @@ -27,7 +27,7 @@ cd $oldpwd ./configure CXXFLAGS="-fPIC -O2" make -j8 cd python -python setup.py build --cpp_implementation +python setup.py -q build --cpp_implementation pip install . diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index b34e28fc..42e4105a 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -269,8 +269,20 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then -disable-concurrent-testing ) ;; + 9.3* ) + XCODEBUILD_TEST_BASE_IOS+=( + # Xcode 9.3 chokes targeting iOS 8.x - http://www.openradar.me/39335367 + -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit + # 9.3 also seems to often fail running destinations in parallel + -disable-concurrent-testing + ) + ;; * ) - echo "Time to update the simulator targets for Xcode ${XCODE_VERSION}" + echo "" + echo "ATTENTION: Time to update the simulator targets for Xcode ${XCODE_VERSION}" + echo "" + echo "Build aborted!" exit 2 ;; esac diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m index a8262e5d..dd05ddb4 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m @@ -63,9 +63,9 @@ static void RaiseException(NSInteger code, NSString *reason) { NSDictionary *exceptionInfo = @{ GPBCodedInputStreamUnderlyingErrorKey: error }; - [[[NSException alloc] initWithName:GPBCodedInputStreamException - reason:reason - userInfo:exceptionInfo] raise]; + [[NSException exceptionWithName:GPBCodedInputStreamException + reason:reason + userInfo:exceptionInfo] raise]; } static void CheckRecursionLimit(GPBCodedInputStreamState *state) { diff --git a/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj b/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj index 0c0e1810..470652d0 100644 --- a/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj +++ b/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj @@ -25,13 +25,6 @@ 8B79657B14992E3F002FFBFC /* GPBRootObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B79657914992E3E002FFBFC /* GPBRootObject.m */; }; 8B8B615D17DF7056002EE618 /* GPBARCUnittestProtos.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B8B615C17DF7056002EE618 /* GPBARCUnittestProtos.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 8B96157414C8C38C00A2AC0B /* GPBDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B96157314C8C38C00A2AC0B /* GPBDescriptor.m */; }; - 8B9742331A89D19F00DCE92C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8B9742321A89D19F00DCE92C /* LaunchScreen.xib */; }; - 8B9742431A8AAA7800DCE92C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9742421A8AAA7800DCE92C /* CoreGraphics.framework */; }; - 8B9A5EA61831993600A9D33B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 8B9A5EA81831993600A9D33B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A5E9F1831913D00A9D33B /* UIKit.framework */; }; - 8B9A5EAE1831993600A9D33B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8B9A5EAC1831993600A9D33B /* InfoPlist.strings */; }; - 8B9A5EB41831993600A9D33B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B9A5EB31831993600A9D33B /* AppDelegate.m */; }; - 8B9A5EB61831993600A9D33B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B9A5EB51831993600A9D33B /* Images.xcassets */; }; 8B9A5EEC18330A0F00A9D33B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A5E9F1831913D00A9D33B /* UIKit.framework */; }; 8BBEA4A9147C727D00C4ADB7 /* GPBCodedInputStreamTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7461B69B0F94FDF800A0C422 /* GPBCodedInputStreamTests.m */; }; 8BBEA4AA147C727D00C4ADB7 /* GPBCodedOuputStreamTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7461B69D0F94FDF800A0C422 /* GPBCodedOuputStreamTests.m */; }; @@ -104,13 +97,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 8B9A5ED01831994600A9D33B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8B9A5EA41831993600A9D33B; - remoteInfo = iOSTestHarness; - }; 8BBEA4BC147C729A00C4ADB7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; @@ -188,14 +174,8 @@ 8B8B615C17DF7056002EE618 /* GPBARCUnittestProtos.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GPBARCUnittestProtos.m; sourceTree = "<group>"; }; 8B96157214C8B06000A2AC0B /* GPBDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPBDescriptor.h; sourceTree = "<group>"; }; 8B96157314C8C38C00A2AC0B /* GPBDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GPBDescriptor.m; sourceTree = "<group>"; }; - 8B9742321A89D19F00DCE92C /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = "<group>"; }; 8B9742421A8AAA7800DCE92C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 8B9A5E9F1831913D00A9D33B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 8B9A5EA51831993600A9D33B /* iOSTestHarness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSTestHarness.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B9A5EAB1831993600A9D33B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 8B9A5EAD1831993600A9D33B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; - 8B9A5EB31831993600A9D33B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; - 8B9A5EB51831993600A9D33B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; 8BBD9DB016DD1DC8008E1EC1 /* unittest_lite.proto */ = {isa = PBXFileReference; lastKnownFileType = text; name = unittest_lite.proto; path = ../../src/google/protobuf/unittest_lite.proto; sourceTree = "<group>"; }; 8BBEA4A6147C727100C4ADB7 /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 8BCF338814ED799900BC5317 /* GPBProtocolBuffers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GPBProtocolBuffers.m; sourceTree = "<group>"; }; @@ -301,16 +281,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8B9A5EA21831993600A9D33B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8B9742431A8AAA7800DCE92C /* CoreGraphics.framework in Frameworks */, - 8B9A5EA81831993600A9D33B /* UIKit.framework in Frameworks */, - 8B9A5EA61831993600A9D33B /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 8BBEA4A3147C727100C4ADB7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -353,7 +323,6 @@ children = ( 7461B52E0F94FAF800A0C422 /* libProtocolBuffers.a */, 8BBEA4A6147C727100C4ADB7 /* UnitTests.xctest */, - 8B9A5EA51831993600A9D33B /* iOSTestHarness.app */, F4487C6E1A9F8F8100531423 /* libTestSingleSourceBuild.a */, ); name = Products; @@ -475,7 +444,6 @@ 7461B6940F94FDDD00A0C422 /* Tests */ = { isa = PBXGroup; children = ( - 8B9A5EA91831993600A9D33B /* iOSTestHarness */, 8B4248B71A8BDD9600BC1EC6 /* protobuf */, 8B210CCD159383D60032D72D /* golden_message */, 8B210CCF159386920032D72D /* golden_packed_fields_message */, @@ -557,26 +525,6 @@ path = Tests; sourceTree = "<group>"; }; - 8B9A5EA91831993600A9D33B /* iOSTestHarness */ = { - isa = PBXGroup; - children = ( - 8B9A5EB31831993600A9D33B /* AppDelegate.m */, - 8B9A5EB51831993600A9D33B /* Images.xcassets */, - 8B9A5EAA1831993600A9D33B /* Supporting Files */, - 8B9742321A89D19F00DCE92C /* LaunchScreen.xib */, - ); - path = iOSTestHarness; - sourceTree = "<group>"; - }; - 8B9A5EAA1831993600A9D33B /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 8B9A5EAB1831993600A9D33B /* Info.plist */, - 8B9A5EAC1831993600A9D33B /* InfoPlist.strings */, - ); - name = "Supporting Files"; - sourceTree = "<group>"; - }; 8BCF334414ED727300BC5317 /* Support */ = { isa = PBXGroup; children = ( @@ -651,23 +599,6 @@ productReference = 7461B52E0F94FAF800A0C422 /* libProtocolBuffers.a */; productType = "com.apple.product-type.library.static"; }; - 8B9A5EA41831993600A9D33B /* iOSTestHarness */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8B9A5ECA1831993600A9D33B /* Build configuration list for PBXNativeTarget "iOSTestHarness" */; - buildPhases = ( - 8B9A5EA11831993600A9D33B /* Sources */, - 8B9A5EA21831993600A9D33B /* Frameworks */, - 8B9A5EA31831993600A9D33B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iOSTestHarness; - productName = iOSTestHarness; - productReference = 8B9A5EA51831993600A9D33B /* iOSTestHarness.app */; - productType = "com.apple.product-type.application"; - }; 8BBEA4A5147C727100C4ADB7 /* UnitTests */ = { isa = PBXNativeTarget; buildConfigurationList = 8BBEA4BA147C728600C4ADB7 /* Build configuration list for PBXNativeTarget "UnitTests" */; @@ -682,7 +613,6 @@ dependencies = ( 8BBEA4BD147C729A00C4ADB7 /* PBXTargetDependency */, F45BBC131B0CDBBA002D064D /* PBXTargetDependency */, - 8B9A5ED11831994600A9D33B /* PBXTargetDependency */, ); name = UnitTests; productName = UnitTests; @@ -738,7 +668,6 @@ targets = ( 7461B52D0F94FAF800A0C422 /* ProtocolBuffers */, 8BBEA4A5147C727100C4ADB7 /* UnitTests */, - 8B9A5EA41831993600A9D33B /* iOSTestHarness */, F4487C551A9F8F8100531423 /* TestSingleSourceBuild */, F45BBC0E1B0CDB50002D064D /* Compile Unittest Protos */, ); @@ -746,16 +675,6 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 8B9A5EA31831993600A9D33B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8B9A5EAE1831993600A9D33B /* InfoPlist.strings in Resources */, - 8B9A5EB61831993600A9D33B /* Images.xcassets in Resources */, - 8B9742331A89D19F00DCE92C /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 8BBEA4A1147C727100C4ADB7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -819,14 +738,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8B9A5EA11831993600A9D33B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8B9A5EB41831993600A9D33B /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 8BBEA4A2147C727100C4ADB7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -898,11 +809,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 8B9A5ED11831994600A9D33B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 8B9A5EA41831993600A9D33B /* iOSTestHarness */; - targetProxy = 8B9A5ED01831994600A9D33B /* PBXContainerItemProxy */; - }; 8BBEA4BD147C729A00C4ADB7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 7461B52D0F94FAF800A0C422 /* ProtocolBuffers */; @@ -915,17 +821,6 @@ }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 8B9A5EAC1831993600A9D33B /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 8B9A5EAD1831993600A9D33B /* en */, - ); - name = InfoPlist.strings; - sourceTree = "<group>"; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 7461B52F0F94FAFA00A0C422 /* Debug */ = { isa = XCBuildConfiguration; @@ -947,36 +842,6 @@ }; name = Release; }; - 8B9A5ECB1831993600A9D33B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_OBJC_ARC = YES; - INFOPLIST_FILE = "$(SRCROOT)/Tests/iOSTestHarness/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 8B9A5ECC1831993600A9D33B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_OBJC_ARC = YES; - INFOPLIST_FILE = "$(SRCROOT)/Tests/iOSTestHarness/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; 8BBEA4A7147C727100C4ADB7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1003,7 +868,6 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSTestHarness.app/iOSTestHarness"; WARNING_CFLAGS = ( "$(inherited)", "-Wno-documentation-unknown-command", @@ -1038,7 +902,6 @@ SWIFT_OBJC_BRIDGING_HEADER = "Tests/UnitTests-Bridging-Header.h"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSTestHarness.app/iOSTestHarness"; WARNING_CFLAGS = ( "$(inherited)", "-Wno-documentation-unknown-command", @@ -1234,15 +1097,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8B9A5ECA1831993600A9D33B /* Build configuration list for PBXNativeTarget "iOSTestHarness" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8B9A5ECB1831993600A9D33B /* Debug */, - 8B9A5ECC1831993600A9D33B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 8BBEA4BA147C728600C4ADB7 /* Build configuration list for PBXNativeTarget "UnitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme b/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme index 69825cc5..bacbcba3 100644 --- a/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme +++ b/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme @@ -95,16 +95,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - <BuildableProductRunnable - runnableDebuggingMode = "0"> + <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" - BlueprintIdentifier = "8B9A5EA41831993600A9D33B" - BuildableName = "iOSTestHarness.app" - BlueprintName = "iOSTestHarness" + BlueprintIdentifier = "7461B52D0F94FAF800A0C422" + BuildableName = "libProtocolBuffers.a" + BlueprintName = "ProtocolBuffers" ReferencedContainer = "container:ProtocolBuffers_iOS.xcodeproj"> </BuildableReference> - </BuildableProductRunnable> + </MacroExpansion> <AdditionalOptions> </AdditionalOptions> </LaunchAction> diff --git a/objectivec/Tests/iOSTestHarness/AppDelegate.m b/objectivec/Tests/iOSTestHarness/AppDelegate.m deleted file mode 100644 index 8c4a586b..00000000 --- a/objectivec/Tests/iOSTestHarness/AppDelegate.m +++ /dev/null @@ -1,35 +0,0 @@ -#import <UIKit/UIKit.h> - -@interface AppDelegate : UIResponder <UIApplicationDelegate> -@property (strong, nonatomic) UIWindow *window; -@end - -@implementation AppDelegate - -@synthesize window; - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - #pragma unused (application, launchOptions) - - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - [self.window makeKeyAndVisible]; - self.window.rootViewController = [[UIViewController alloc] init]; - - UILabel *label = - [[UILabel alloc] initWithFrame:CGRectMake(0, 200, CGRectGetWidth(self.window.frame), 40)]; - label.text = @"Protocol Buffer Test Harness"; - label.textAlignment = NSTextAlignmentCenter; - [self.window addSubview:label]; - - return YES; -} - -@end - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9f4a9e59..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "appicon_40.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "appicon_60.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "appicon_29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "appicon_58.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "appicon_87.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "appicon_80.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "appicon_120.png", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "57x57", - "scale" : "1x" - }, - { - "idiom" : "iphone", - "size" : "57x57", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "appicon_120.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "appicon_180.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "appicon_20.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "appicon_40.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "appicon_29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "appicon_58.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "appicon_40.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "appicon_80.png", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "50x50", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "50x50", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "72x72", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "72x72", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "appicon_76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "appicon_152.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "appicon_167.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "appicon_1024.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -}
\ No newline at end of file diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_1024.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_1024.png Binary files differdeleted file mode 100644 index 6b6a102e..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_1024.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_120.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_120.png Binary files differdeleted file mode 100644 index 1bac2e58..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_120.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_152.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_152.png Binary files differdeleted file mode 100644 index 80f13301..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_152.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_167.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_167.png Binary files differdeleted file mode 100644 index 99f0745e..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_167.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_180.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_180.png Binary files differdeleted file mode 100644 index ae123712..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_180.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_20.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_20.png Binary files differdeleted file mode 100644 index 8e530c49..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_20.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_29.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_29.png Binary files differdeleted file mode 100644 index 1826feb9..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_29.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_40.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_40.png Binary files differdeleted file mode 100644 index f2e2ded1..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_40.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_58.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_58.png Binary files differdeleted file mode 100644 index 0ec6d003..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_58.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_60.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_60.png Binary files differdeleted file mode 100644 index 8664e8b0..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_60.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_76.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_76.png Binary files differdeleted file mode 100644 index d4bb05b9..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_76.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_80.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_80.png Binary files differdeleted file mode 100644 index 8fa6a8e7..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_80.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_87.png b/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_87.png Binary files differdeleted file mode 100644 index b41bc67b..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/appicon_87.png +++ /dev/null diff --git a/objectivec/Tests/iOSTestHarness/Images.xcassets/LaunchImage.launchimage/Contents.json b/objectivec/Tests/iOSTestHarness/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index a0ad363c..00000000 --- a/objectivec/Tests/iOSTestHarness/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -}
\ No newline at end of file diff --git a/objectivec/Tests/iOSTestHarness/Info.plist b/objectivec/Tests/iOSTestHarness/Info.plist deleted file mode 100644 index 24bd333d..00000000 --- a/objectivec/Tests/iOSTestHarness/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleDisplayName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>UILaunchStoryboardName</key> - <string>LaunchScreen</string> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> - <key>UISupportedInterfaceOrientations~ipad</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - <string>UIInterfaceOrientationPortraitUpsideDown</string> - </array> -</dict> -</plist> diff --git a/objectivec/Tests/iOSTestHarness/LaunchScreen.xib b/objectivec/Tests/iOSTestHarness/LaunchScreen.xib deleted file mode 100644 index 22204bfe..00000000 --- a/objectivec/Tests/iOSTestHarness/LaunchScreen.xib +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> - <dependencies> - <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/> - <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> - </dependencies> - <objects> - <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> - <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> - <view contentMode="scaleToFill" id="iN0-l3-epB"> - <rect key="frame" x="0.0" y="0.0" width="630" height="503"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Protocol Buffer Test Harness" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> - <rect key="frame" x="20" y="147" width="591" height="43"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> - <nil key="highlightedColor"/> - </label> - </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> - <constraints> - <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="Kid-kn-2rF"/> - <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> - <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> - </constraints> - <nil key="simulatedStatusBarMetrics"/> - <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> - <point key="canvasLocation" x="479" y="456.5"/> - </view> - </objects> -</document> diff --git a/objectivec/Tests/iOSTestHarness/en.lproj/InfoPlist.strings b/objectivec/Tests/iOSTestHarness/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/objectivec/Tests/iOSTestHarness/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index 4c68c391..c8f4d62b 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -222,7 +222,13 @@ static zval* message_get_property_ptr_ptr(zval* object, zval* member, int type, } static HashTable* message_get_properties(zval* object TSRMLS_DC) { - return NULL; + // User cannot get property directly (e.g., $a = $m->a) + zend_error(E_USER_ERROR, "Cannot access private properties."); +#if PHP_MAJOR_VERSION < 7 + return zend_std_get_properties(object TSRMLS_CC); +#else + return zend_std_get_properties(object); +#endif } static HashTable* message_get_gc(zval* object, CACHED_VALUE** table, diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index 04ee1c34..3aff7bd6 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -82,7 +82,7 @@ class Message $pool = DescriptorPool::getGeneratedPool(); $this->desc = $pool->getDescriptorByClassName(get_class($this)); if (is_null($this->desc)) { - user_error(get_class($this) . "is not found in descriptor pool."); + user_error(get_class($this) . " is not found in descriptor pool."); } foreach ($this->desc->getField() as $field) { $setter = $field->getSetter(); diff --git a/php/src/Google/Protobuf/Timestamp.php b/php/src/Google/Protobuf/Timestamp.php index 7da8e956..f2286ab4 100644 --- a/php/src/Google/Protobuf/Timestamp.php +++ b/php/src/Google/Protobuf/Timestamp.php @@ -159,14 +159,10 @@ class Timestamp extends \Google\Protobuf\Internal\Message /** * Converts PHP DateTime to Timestamp. * - * @param DateTime $datetime + * @param \DateTime $datetime */ - public function fromDateTime($datetime) + public function fromDateTime(\DateTime $datetime) { - if (get_class($datetime) !== \DateTime::class) { - trigger_error("Given parameter is not a DateTime.", - E_USER_ERROR); - } $this->seconds = $datetime->format('U'); $this->nanos = 0; } @@ -174,7 +170,7 @@ class Timestamp extends \Google\Protobuf\Internal\Message /** * Converts Timestamp to PHP DateTime. Nano second is ignored. * - * @return DateTime $datetime + * @return \DateTime $datetime */ public function toDateTime() { diff --git a/php/tests/test.sh b/php/tests/test.sh index 2983fe99..6e70eb2a 100755 --- a/php/tests/test.sh +++ b/php/tests/test.sh @@ -21,7 +21,7 @@ do echo "****************************" echo "* $t" echo "****************************" - # php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t + php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t echo "" done diff --git a/python/setup.py b/python/setup.py index bdae6913..9a328cb5 100755 --- a/python/setup.py +++ b/python/setup.py @@ -206,6 +206,8 @@ if __name__ == '__main__': v = float('.'.join(v.split('.')[:2])) if v >= 10.12: extra_compile_args.append('-std=c++11') + elif os.getenv('KOKORO_BUILD_NUMBER') or os.getenv('KOKORO_BUILD_ID'): + extra_compile_args.append('-std=c++11') if warnings_as_errors in sys.argv: extra_compile_args.append('-Werror') diff --git a/ruby/Rakefile b/ruby/Rakefile index 7aecfe85..ff09cebb 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -52,6 +52,12 @@ if RUBY_PLATFORM == "java" end else Rake::ExtensionTask.new("protobuf_c", spec) do |ext| + unless RUBY_PLATFORM =~ /darwin/ + # TODO: also set "no_native to true" for mac if possible. As is, + # "no_native" can only be set if the RUBY_PLATFORM doing + # cross-compilation is contained in the "ext.cross_platform" array. + ext.no_native = true + end ext.ext_dir = "ext/google/protobuf_c" ext.lib_dir = "lib/google" ext.cross_compile = true diff --git a/ruby/lib/google/protobuf/repeated_field.rb b/ruby/lib/google/protobuf/repeated_field.rb index 11d6c2eb..2dae1e65 100644 --- a/ruby/lib/google/protobuf/repeated_field.rb +++ b/ruby/lib/google/protobuf/repeated_field.rb @@ -150,12 +150,12 @@ module Google end - %w(delete delete_at delete_if shift slice! unshift).each do |method_name| + %w(delete delete_at shift slice! unshift).each do |method_name| define_array_wrapper_method(method_name) end - %w(collect! compact! fill flatten! insert reverse! + %w(collect! compact! delete_if fill flatten! insert reverse! rotate! select! shuffle! sort! sort_by! uniq!).each do |method_name| define_array_wrapper_with_result_method(method_name) end diff --git a/ruby/tests/repeated_field_test.rb b/ruby/tests/repeated_field_test.rb index b64c3991..61ac4afd 100644 --- a/ruby/tests/repeated_field_test.rb +++ b/ruby/tests/repeated_field_test.rb @@ -369,6 +369,15 @@ class RepeatedFieldTest < Test::Unit::TestCase end end + def test_delete_if + m = TestMessage.new + reference_arr = %w(foo bar baz) + m.repeated_string += reference_arr.clone + check_self_modifying_method(m.repeated_string, reference_arr) do |arr| + arr.delete_if { |v| v == "bar" } + end + end + def test_fill m = TestMessage.new reference_arr = %w(foo bar baz) diff --git a/src/google/protobuf/io/printer.cc b/src/google/protobuf/io/printer.cc index 8493268d..de67cef1 100644 --- a/src/google/protobuf/io/printer.cc +++ b/src/google/protobuf/io/printer.cc @@ -350,10 +350,12 @@ void Printer::CopyToBuffer(const char* data, int size) { while (size > buffer_size_) { // Data exceeds space in the buffer. Copy what we can and request a // new buffer. - memcpy(buffer_, data, buffer_size_); - offset_ += buffer_size_; - data += buffer_size_; - size -= buffer_size_; + if (buffer_size_ > 0) { + memcpy(buffer_, data, buffer_size_); + offset_ += buffer_size_; + data += buffer_size_; + size -= buffer_size_; + } void* void_buffer; failed_ = !output_->Next(&void_buffer, &buffer_size_); if (failed_) return; diff --git a/src/google/protobuf/stubs/mathlimits.h b/src/google/protobuf/stubs/mathlimits.h index 2391ac4c..9c9d0e9a 100644 --- a/src/google/protobuf/stubs/mathlimits.h +++ b/src/google/protobuf/stubs/mathlimits.h @@ -243,7 +243,7 @@ DECL_UNSIGNED_INT_LIMITS(unsigned long long int) #endif // ========================================================================= // -#ifdef WIN32 // Lacks built-in isnan() and isinf() +#if WIN32 && !__MINGW32__ // Lacks built-in isnan() and isinf() #define DECL_FP_LIMIT_FUNCS \ static bool IsFinite(const Type x) { return _finite(x); } \ static bool IsNaN(const Type x) { return _isnan(x); } \ diff --git a/src/google/protobuf/util/package_info.h b/src/google/protobuf/util/package_info.h index e37e6dc0..96019203 100644 --- a/src/google/protobuf/util/package_info.h +++ b/src/google/protobuf/util/package_info.h @@ -38,7 +38,7 @@ namespace protobuf { // Utility classes. // -// This package contains various utilities for message comprasion, JSON +// This package contains various utilities for message comparison, JSON // conversion, well known types, etc. namespace util {} @@ -228,7 +228,8 @@ internal_install_python_deps() { fi # Install tox (OS X doesn't have pip). if [ $(uname -s) == "Darwin" ]; then - sudo easy_install tox + brew upgrade python + python3 -m pip install tox else sudo pip install tox fi |