From 6fd4e0edd4de22dec9eda13dc0b29214f2ca117e Mon Sep 17 00:00:00 2001 From: Loo Rong Jie Date: Thu, 21 Jun 2018 11:29:04 +0800 Subject: Update protobuf to 3.6.0. Fixes #5439 --- third_party/protobuf/3.6.0/objectivec/.gitignore | 23 + .../objectivec/DevTools/check_version_stamps.sh | 55 + .../objectivec/DevTools/compile_testing_protos.sh | 149 + .../3.6.0/objectivec/DevTools/full_mac_build.sh | 336 + .../protobuf/3.6.0/objectivec/DevTools/pddm.py | 690 ++ .../3.6.0/objectivec/DevTools/pddm_tests.py | 515 + third_party/protobuf/3.6.0/objectivec/GPBArray.h | 1967 +++ third_party/protobuf/3.6.0/objectivec/GPBArray.m | 2551 ++++ .../3.6.0/objectivec/GPBArray_PackagePrivate.h | 130 + .../protobuf/3.6.0/objectivec/GPBBootstrap.h | 123 + .../3.6.0/objectivec/GPBCodedInputStream.h | 253 + .../3.6.0/objectivec/GPBCodedInputStream.m | 505 + .../GPBCodedInputStream_PackagePrivate.h | 112 + .../3.6.0/objectivec/GPBCodedOutputStream.h | 748 ++ .../3.6.0/objectivec/GPBCodedOutputStream.m | 1210 ++ .../GPBCodedOutputStream_PackagePrivate.h | 126 + .../protobuf/3.6.0/objectivec/GPBDescriptor.h | 288 + .../protobuf/3.6.0/objectivec/GPBDescriptor.m | 1102 ++ .../objectivec/GPBDescriptor_PackagePrivate.h | 325 + .../protobuf/3.6.0/objectivec/GPBDictionary.h | 5770 +++++++++ .../protobuf/3.6.0/objectivec/GPBDictionary.m | 12120 +++++++++++++++++++ .../objectivec/GPBDictionary_PackagePrivate.h | 488 + .../3.6.0/objectivec/GPBExtensionInternals.h | 50 + .../3.6.0/objectivec/GPBExtensionInternals.m | 391 + .../3.6.0/objectivec/GPBExtensionRegistry.h | 87 + .../3.6.0/objectivec/GPBExtensionRegistry.m | 130 + third_party/protobuf/3.6.0/objectivec/GPBMessage.h | 470 + third_party/protobuf/3.6.0/objectivec/GPBMessage.m | 3317 +++++ .../3.6.0/objectivec/GPBMessage_PackagePrivate.h | 124 + .../protobuf/3.6.0/objectivec/GPBProtocolBuffers.h | 76 + .../protobuf/3.6.0/objectivec/GPBProtocolBuffers.m | 66 + .../objectivec/GPBProtocolBuffers_RuntimeSupport.h | 40 + .../protobuf/3.6.0/objectivec/GPBRootObject.h | 52 + .../protobuf/3.6.0/objectivec/GPBRootObject.m | 245 + .../objectivec/GPBRootObject_PackagePrivate.h | 46 + .../protobuf/3.6.0/objectivec/GPBRuntimeTypes.h | 144 + .../protobuf/3.6.0/objectivec/GPBUnknownField.h | 99 + .../protobuf/3.6.0/objectivec/GPBUnknownField.m | 336 + .../protobuf/3.6.0/objectivec/GPBUnknownFieldSet.h | 82 + .../protobuf/3.6.0/objectivec/GPBUnknownFieldSet.m | 395 + .../objectivec/GPBUnknownFieldSet_PackagePrivate.h | 61 + .../objectivec/GPBUnknownField_PackagePrivate.h | 47 + .../protobuf/3.6.0/objectivec/GPBUtilities.h | 539 + .../protobuf/3.6.0/objectivec/GPBUtilities.m | 2166 ++++ .../3.6.0/objectivec/GPBUtilities_PackagePrivate.h | 351 + .../protobuf/3.6.0/objectivec/GPBWellKnownTypes.h | 245 + .../protobuf/3.6.0/objectivec/GPBWellKnownTypes.m | 272 + .../protobuf/3.6.0/objectivec/GPBWireFormat.h | 73 + .../protobuf/3.6.0/objectivec/GPBWireFormat.m | 85 + .../ProtocolBuffers_OSX.xcodeproj/project.pbxproj | 1114 ++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcschemes/PerformanceTests.xcscheme | 344 + .../xcschemes/ProtocolBuffers.xcscheme | 133 + .../ProtocolBuffers_iOS.xcodeproj/project.pbxproj | 1139 ++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcschemes/PerformanceTests.xcscheme | 354 + .../xcschemes/ProtocolBuffers.xcscheme | 133 + third_party/protobuf/3.6.0/objectivec/README.md | 190 + .../OSXCocoaPodsTester.xcodeproj/project.pbxproj | 290 + .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcschemes/OSXCocoaPodsTester.xcscheme | 91 + .../OSXCocoaPodsTester/AppDelegate.h | 37 + .../OSXCocoaPodsTester/AppDelegate.m | 48 + .../AppIcon.appiconset/Contents.json | 58 + .../OSXCocoaPodsTester/Base.lproj/MainMenu.xib | 680 ++ .../OSXCocoaPodsTester/Info.plist | 34 + .../OSXCocoaPodsTester/OSXCocoaPodsTester/main.m | 35 + .../CocoaPods/OSXCocoaPodsTester/Podfile-framework | 10 + .../CocoaPods/OSXCocoaPodsTester/Podfile-static | 8 + .../3.6.0/objectivec/Tests/CocoaPods/README.md | 9 + .../CocoaPods/iOSCocoaPodsTester/Podfile-framework | 10 + .../CocoaPods/iOSCocoaPodsTester/Podfile-static | 8 + .../iOSCocoaPodsTester.xcodeproj/project.pbxproj | 309 + .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcschemes/iOSCocoaPodsTester.xcscheme | 91 + .../iOSCocoaPodsTester/AppDelegate.h | 39 + .../iOSCocoaPodsTester/AppDelegate.m | 67 + .../AppIcon.appiconset/Contents.json | 68 + .../Base.lproj/LaunchScreen.storyboard | 27 + .../iOSCocoaPodsTester/Base.lproj/Main.storyboard | 26 + .../iOSCocoaPodsTester/Info.plist | 47 + .../iOSCocoaPodsTester/ViewController.h | 37 + .../iOSCocoaPodsTester/ViewController.m | 49 + .../iOSCocoaPodsTester/iOSCocoaPodsTester/main.m | 39 + .../3.6.0/objectivec/Tests/CocoaPods/run_tests.sh | 150 + .../3.6.0/objectivec/Tests/GPBARCUnittestProtos.m | 63 + .../3.6.0/objectivec/Tests/GPBArrayTests.m | 3715 ++++++ .../objectivec/Tests/GPBCodedInputStreamTests.m | 460 + .../objectivec/Tests/GPBCodedOuputStreamTests.m | 436 + .../3.6.0/objectivec/Tests/GPBCompileTest01.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest02.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest03.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest04.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest05.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest06.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest07.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest08.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest09.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest10.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest11.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest12.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest13.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest14.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest15.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest16.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest17.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest18.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest19.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest20.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest21.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest22.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest23.m | 40 + .../3.6.0/objectivec/Tests/GPBCompileTest24.m | 42 + .../3.6.0/objectivec/Tests/GPBCompileTest25.m | 42 + .../3.6.0/objectivec/Tests/GPBConcurrencyTests.m | 206 + .../3.6.0/objectivec/Tests/GPBDescriptorTests.m | 371 + .../objectivec/Tests/GPBDictionaryTests+Bool.m | 2450 ++++ .../objectivec/Tests/GPBDictionaryTests+Int32.m | 3676 ++++++ .../objectivec/Tests/GPBDictionaryTests+Int64.m | 3676 ++++++ .../objectivec/Tests/GPBDictionaryTests+String.m | 3384 ++++++ .../objectivec/Tests/GPBDictionaryTests+UInt32.m | 3676 ++++++ .../objectivec/Tests/GPBDictionaryTests+UInt64.m | 3675 ++++++ .../3.6.0/objectivec/Tests/GPBDictionaryTests.m | 186 + .../3.6.0/objectivec/Tests/GPBDictionaryTests.pddm | 1048 ++ .../objectivec/Tests/GPBExtensionRegistryTest.m | 138 + .../3.6.0/objectivec/Tests/GPBMessageTests+Merge.m | 700 ++ .../objectivec/Tests/GPBMessageTests+Runtime.m | 2515 ++++ .../Tests/GPBMessageTests+Serialization.m | 1227 ++ .../3.6.0/objectivec/Tests/GPBMessageTests.m | 2106 ++++ .../objectivec/Tests/GPBObjectiveCPlusPlusTest.mm | 69 + .../protobuf/3.6.0/objectivec/Tests/GPBPerfTests.m | 413 + .../3.6.0/objectivec/Tests/GPBSwiftTests.swift | 460 + .../3.6.0/objectivec/Tests/GPBTestUtilities.h | 103 + .../3.6.0/objectivec/Tests/GPBTestUtilities.m | 2546 ++++ .../3.6.0/objectivec/Tests/GPBUnittestProtos.m | 75 + .../3.6.0/objectivec/Tests/GPBUnittestProtos2.m | 34 + .../objectivec/Tests/GPBUnknownFieldSetTest.m | 502 + .../3.6.0/objectivec/Tests/GPBUtilitiesTests.m | 400 + .../3.6.0/objectivec/Tests/GPBWellKnownTypesTest.m | 214 + .../3.6.0/objectivec/Tests/GPBWireFormatTests.m | 258 + .../objectivec/Tests/UnitTests-Bridging-Header.h | 6 + .../3.6.0/objectivec/Tests/UnitTests-Info.plist | 20 + .../protobuf/3.6.0/objectivec/Tests/golden_message | Bin 0 -> 493 bytes .../objectivec/Tests/golden_packed_fields_message | Bin 0 -> 493 bytes .../Tests/text_format_map_unittest_data.txt | 70 + .../objectivec/Tests/text_format_unittest_data.txt | 116 + .../3.6.0/objectivec/Tests/unittest_cycle.proto | 56 + .../objectivec/Tests/unittest_deprecated.proto | 95 + .../Tests/unittest_deprecated_file.proto | 76 + .../Tests/unittest_extension_chain_a.proto | 51 + .../Tests/unittest_extension_chain_b.proto | 47 + .../Tests/unittest_extension_chain_c.proto | 45 + .../Tests/unittest_extension_chain_d.proto | 49 + .../Tests/unittest_extension_chain_e.proto | 40 + .../Tests/unittest_extension_chain_f.proto | 44 + .../Tests/unittest_extension_chain_g.proto | 41 + .../3.6.0/objectivec/Tests/unittest_objc.proto | 488 + .../objectivec/Tests/unittest_objc_startup.proto | 49 + .../objectivec/Tests/unittest_runtime_proto2.proto | 128 + .../objectivec/Tests/unittest_runtime_proto3.proto | 121 + .../3.6.0/objectivec/generate_well_known_types.sh | 76 + .../3.6.0/objectivec/google/protobuf/Any.pbobjc.h | 182 + .../3.6.0/objectivec/google/protobuf/Any.pbobjc.m | 112 + .../3.6.0/objectivec/google/protobuf/Api.pbobjc.h | 311 + .../3.6.0/objectivec/google/protobuf/Api.pbobjc.m | 356 + .../objectivec/google/protobuf/Duration.pbobjc.h | 145 + .../objectivec/google/protobuf/Duration.pbobjc.m | 107 + .../objectivec/google/protobuf/Empty.pbobjc.h | 74 + .../objectivec/google/protobuf/Empty.pbobjc.m | 83 + .../objectivec/google/protobuf/FieldMask.pbobjc.h | 281 + .../objectivec/google/protobuf/FieldMask.pbobjc.m | 96 + .../google/protobuf/SourceContext.pbobjc.h | 77 + .../google/protobuf/SourceContext.pbobjc.m | 96 + .../objectivec/google/protobuf/Struct.pbobjc.h | 204 + .../objectivec/google/protobuf/Struct.pbobjc.m | 296 + .../objectivec/google/protobuf/Timestamp.pbobjc.h | 163 + .../objectivec/google/protobuf/Timestamp.pbobjc.m | 107 + .../3.6.0/objectivec/google/protobuf/Type.pbobjc.h | 444 + .../3.6.0/objectivec/google/protobuf/Type.pbobjc.m | 706 ++ .../objectivec/google/protobuf/Wrappers.pbobjc.h | 219 + .../objectivec/google/protobuf/Wrappers.pbobjc.m | 439 + 185 files changed, 91211 insertions(+) create mode 100644 third_party/protobuf/3.6.0/objectivec/.gitignore create mode 100644 third_party/protobuf/3.6.0/objectivec/DevTools/check_version_stamps.sh create mode 100644 third_party/protobuf/3.6.0/objectivec/DevTools/compile_testing_protos.sh create mode 100644 third_party/protobuf/3.6.0/objectivec/DevTools/full_mac_build.sh create mode 100644 third_party/protobuf/3.6.0/objectivec/DevTools/pddm.py create mode 100644 third_party/protobuf/3.6.0/objectivec/DevTools/pddm_tests.py create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBArray.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBArray.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBArray_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBBootstrap.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedInputStream.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedInputStream.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedInputStream_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedOutputStream.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedOutputStream.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBCodedOutputStream_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDescriptor.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDescriptor.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDescriptor_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDictionary.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDictionary.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBDictionary_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBExtensionInternals.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBExtensionInternals.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBExtensionRegistry.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBExtensionRegistry.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBMessage.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBMessage.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBMessage_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBProtocolBuffers.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBProtocolBuffers.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBProtocolBuffers_RuntimeSupport.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBRootObject.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBRootObject.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBRootObject_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBRuntimeTypes.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownField.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownField.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownFieldSet.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownFieldSet.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownFieldSet_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUnknownField_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUtilities.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUtilities.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBUtilities_PackagePrivate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBWellKnownTypes.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBWellKnownTypes.m create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBWireFormat.h create mode 100644 third_party/protobuf/3.6.0/objectivec/GPBWireFormat.m create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/PerformanceTests.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/PerformanceTests.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/ProtocolBuffers_iOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/README.md create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester.xcodeproj/project.pbxproj create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester.xcodeproj/xcshareddata/xcschemes/OSXCocoaPodsTester.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/AppDelegate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/AppDelegate.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/Base.lproj/MainMenu.xib create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/Info.plist create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/main.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile-framework create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile-static create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/README.md create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile-framework create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile-static create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester.xcodeproj/project.pbxproj create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester.xcodeproj/xcshareddata/xcschemes/iOSCocoaPodsTester.xcscheme create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/AppDelegate.h create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/AppDelegate.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/Base.lproj/LaunchScreen.storyboard create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/Base.lproj/Main.storyboard create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/Info.plist create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/ViewController.h create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/ViewController.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/main.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/CocoaPods/run_tests.sh create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBARCUnittestProtos.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBArrayTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCodedInputStreamTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCodedOuputStreamTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest01.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest02.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest03.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest04.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest05.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest06.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest07.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest08.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest09.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest10.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest11.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest12.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest13.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest14.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest15.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest16.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest17.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest18.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest19.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest20.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest21.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest22.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest23.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest24.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBCompileTest25.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBConcurrencyTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDescriptorTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+Bool.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+Int32.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+Int64.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+String.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+UInt32.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests+UInt64.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBDictionaryTests.pddm create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBExtensionRegistryTest.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBMessageTests+Merge.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBMessageTests+Runtime.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBMessageTests+Serialization.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBMessageTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBObjectiveCPlusPlusTest.mm create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBPerfTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBSwiftTests.swift create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBTestUtilities.h create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBTestUtilities.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBUnittestProtos.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBUnittestProtos2.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBUnknownFieldSetTest.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBUtilitiesTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBWellKnownTypesTest.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/GPBWireFormatTests.m create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/UnitTests-Bridging-Header.h create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/UnitTests-Info.plist create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/golden_message create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/golden_packed_fields_message create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/text_format_map_unittest_data.txt create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/text_format_unittest_data.txt create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_cycle.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_deprecated.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_deprecated_file.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_a.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_b.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_c.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_d.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_e.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_f.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_extension_chain_g.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_objc.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_objc_startup.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_runtime_proto2.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/Tests/unittest_runtime_proto3.proto create mode 100644 third_party/protobuf/3.6.0/objectivec/generate_well_known_types.sh create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Any.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Any.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Api.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Api.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Duration.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Duration.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Empty.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Empty.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/FieldMask.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/FieldMask.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/SourceContext.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/SourceContext.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Struct.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Struct.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Timestamp.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Timestamp.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Type.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Type.pbobjc.m create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Wrappers.pbobjc.h create mode 100644 third_party/protobuf/3.6.0/objectivec/google/protobuf/Wrappers.pbobjc.m (limited to 'third_party/protobuf/3.6.0/objectivec') diff --git a/third_party/protobuf/3.6.0/objectivec/.gitignore b/third_party/protobuf/3.6.0/objectivec/.gitignore new file mode 100644 index 0000000000..f786ffce82 --- /dev/null +++ b/third_party/protobuf/3.6.0/objectivec/.gitignore @@ -0,0 +1,23 @@ +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa diff --git a/third_party/protobuf/3.6.0/objectivec/DevTools/check_version_stamps.sh b/third_party/protobuf/3.6.0/objectivec/DevTools/check_version_stamps.sh new file mode 100644 index 0000000000..1acbe2a2b7 --- /dev/null +++ b/third_party/protobuf/3.6.0/objectivec/DevTools/check_version_stamps.sh @@ -0,0 +1,55 @@ +#!/bin/bash -eu + +# This script checks that the runtime version number constant in the compiler +# source and in the runtime source is the same. +# +# A distro can be made of the protobuf sources with only a subset of the +# languages, so if the compiler depended on the Objective C runtime, those +# builds would break. At the same time, we don't want the runtime source +# depending on the compiler sources; so two copies of the constant are needed. + +readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") +readonly ProtoRootDir="${ScriptDir}/../.." + +die() { + echo "Error: $1" + exit 1 +} + +readonly GeneratorSrc="${ProtoRootDir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc" +readonly RuntimeSrc="${ProtoRootDir}/objectivec/GPBBootstrap.h" + +check_constant() { + local ConstantName="$1" + + # Collect version from generator sources. + local GeneratorVersion=$( \ + cat "${GeneratorSrc}" \ + | sed -n -e "s:const int32 ${ConstantName} = \([0-9]*\);:\1:p" + ) + if [[ -z "${GeneratorVersion}" ]] ; then + die "Failed to find ${ConstantName} in the generator source (${GeneratorSrc})." + fi + + # Collect version from runtime sources. + local RuntimeVersion=$( \ + cat "${RuntimeSrc}" \ + | sed -n -e "s:#define ${ConstantName} \([0-9]*\):\1:p" + ) + if [[ -z "${RuntimeVersion}" ]] ; then + die "Failed to find ${ConstantName} in the runtime source (${RuntimeSrc})." + fi + + # Compare them. + if [[ "${GeneratorVersion}" != "${RuntimeVersion}" ]] ; then + die "${ConstantName} values don't match! + Generator: ${GeneratorVersion} from ${GeneratorSrc} + Runtime: ${RuntimeVersion} from ${RuntimeSrc} +" + fi +} + +# Do the check. +check_constant GOOGLE_PROTOBUF_OBJC_VERSION + +# Success diff --git a/third_party/protobuf/3.6.0/objectivec/DevTools/compile_testing_protos.sh b/third_party/protobuf/3.6.0/objectivec/DevTools/compile_testing_protos.sh new file mode 100644 index 0000000000..d7f3f60589 --- /dev/null +++ b/third_party/protobuf/3.6.0/objectivec/DevTools/compile_testing_protos.sh @@ -0,0 +1,149 @@ +#!/bin/bash -eu +# Invoked by the Xcode projects to build the protos needed for the unittests. + +readonly OUTPUT_DIR="${PROJECT_DERIVED_FILE_DIR}/protos" + +# ----------------------------------------------------------------------------- +# Helper for bailing. +die() { + echo "Error: $1" + exit 2 +} + +# ----------------------------------------------------------------------------- +# What to do. +case "${ACTION}" in + "") + # Build, fall thru + ;; + "clean") + rm -rf "${OUTPUT_DIR}" + exit 0 + ;; + *) + die "Unknown action requested: ${ACTION}" + ;; +esac + +# ----------------------------------------------------------------------------- +# Ensure the output dir exists +mkdir -p "${OUTPUT_DIR}/google/protobuf" + +# ----------------------------------------------------------------------------- +# Move to the top of the protobuf directories and ensure there is a protoc +# binary to use. +cd "${SRCROOT}/.." +[[ -x src/protoc ]] || \ + die "Could not find the protoc binary; make sure you have built it (objectivec/DevTools/full_mac_build.sh -h)." + +# ----------------------------------------------------------------------------- +# See the compiler or proto files have changed. +RUN_PROTOC=no +if [[ ! -d "${OUTPUT_DIR}" ]] ; then + RUN_PROTOC=yes +else + # Find the newest input file (protos, compiler, and this script). + # (these patterns catch some extra stuff, but better to over sample than + # under) + readonly NewestInput=$(find \ + src/google/protobuf/*.proto \ + objectivec/Tests/*.proto \ + src/.libs src/*.la src/protoc \ + objectivec/DevTools/compile_testing_protos.sh \ + -type f -print0 \ + | xargs -0 stat -f "%m %N" \ + | sort -n | tail -n1 | cut -f2- -d" ") + # Find the oldest output file. + readonly OldestOutput=$(find \ + "${OUTPUT_DIR}" \ + -type f -name "*pbobjc.[hm]" -print0 \ + | xargs -0 stat -f "%m %N" \ + | sort -n -r | tail -n1 | cut -f2- -d" ") + # If the newest input is newer than the oldest output, regenerate. + if [[ "${NewestInput}" -nt "${OldestOutput}" ]] ; then + RUN_PROTOC=yes + fi +fi + +if [[ "${RUN_PROTOC}" != "yes" ]] ; then + # Up to date. + exit 0 +fi + +# ----------------------------------------------------------------------------- +# Prune out all the files from previous generations to ensure we only have +# current ones. +find "${OUTPUT_DIR}" \ + -type f -name "*pbobjc.[hm]" -print0 \ + | xargs -0 rm -rf + +# ----------------------------------------------------------------------------- +# Helper to invoke protoc +compile_protos() { + src/protoc \ + --objc_out="${OUTPUT_DIR}/google/protobuf" \ + --proto_path=src/google/protobuf/ \ + --proto_path=src \ + "$@" +} + +# ----------------------------------------------------------------------------- +# Generate most of the proto files that exist in the C++ src tree. Several +# are used in the tests, but the extra don't hurt in that they ensure ObjC +# sources can be generated from them. + +CORE_PROTO_FILES=( + src/google/protobuf/any_test.proto + src/google/protobuf/unittest_arena.proto + src/google/protobuf/unittest_custom_options.proto + src/google/protobuf/unittest_enormous_descriptor.proto + src/google/protobuf/unittest_embed_optimize_for.proto + src/google/protobuf/unittest_empty.proto + src/google/protobuf/unittest_import.proto + src/google/protobuf/unittest_import_lite.proto + src/google/protobuf/unittest_lite.proto + src/google/protobuf/unittest_mset.proto + src/google/protobuf/unittest_mset_wire_format.proto + src/google/protobuf/unittest_no_arena.proto + src/google/protobuf/unittest_no_arena_import.proto + src/google/protobuf/unittest_no_generic_services.proto + src/google/protobuf/unittest_optimize_for.proto + src/google/protobuf/unittest.proto + src/google/protobuf/unittest_import_public.proto + src/google/protobuf/unittest_import_public_lite.proto + src/google/protobuf/unittest_drop_unknown_fields.proto + src/google/protobuf/unittest_preserve_unknown_enum.proto + src/google/protobuf/map_lite_unittest.proto + src/google/protobuf/map_proto2_unittest.proto + src/google/protobuf/map_unittest.proto + # The unittest_custom_options.proto extends the messages in descriptor.proto + # so we build it in to test extending in general. The library doesn't provide + # a descriptor as it doesn't use the classes/enums. + src/google/protobuf/descriptor.proto +) + +# Note: there is overlap in package.Message names between some of the test +# files, so they can't be generated all at once. This works because the overlap +# isn't linked into a single binary. +for a_proto in "${CORE_PROTO_FILES[@]}" ; do + compile_protos "${a_proto}" +done + +# ----------------------------------------------------------------------------- +# Generate the Objective C specific testing protos. +compile_protos \ + --proto_path="objectivec/Tests" \ + objectivec/Tests/unittest_cycle.proto \ + objectivec/Tests/unittest_deprecated.proto \ + objectivec/Tests/unittest_deprecated_file.proto \ + objectivec/Tests/unittest_extension_chain_a.proto \ + objectivec/Tests/unittest_extension_chain_b.proto \ + objectivec/Tests/unittest_extension_chain_c.proto \ + objectivec/Tests/unittest_extension_chain_d.proto \ + objectivec/Tests/unittest_extension_chain_e.proto \ + objectivec/Tests/unittest_extension_chain_f.proto \ + objectivec/Tests/unittest_extension_chain_g.proto \ + objectivec/Tests/unittest_runtime_proto2.proto \ + objectivec/Tests/unittest_runtime_proto3.proto \ + objectivec/Tests/unittest_objc.proto \ + objectivec/Tests/unittest_objc_startup.proto diff --git a/third_party/protobuf/3.6.0/objectivec/DevTools/full_mac_build.sh b/third_party/protobuf/3.6.0/objectivec/DevTools/full_mac_build.sh new file mode 100644 index 0000000000..c673fcba37 --- /dev/null +++ b/third_party/protobuf/3.6.0/objectivec/DevTools/full_mac_build.sh @@ -0,0 +1,336 @@ +#!/bin/bash +# +# Helper to do build so you don't have to remember all the steps/args. + + +set -eu + +# Some base locations. +readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") +readonly ProtoRootDir="${ScriptDir}/../.." + +printUsage() { + NAME=$(basename "${0}") + cat << EOF +usage: ${NAME} [OPTIONS] + +This script does the common build steps needed. + +OPTIONS: + + General: + + -h, --help + Show this message + -c, --clean + Issue a clean before the normal build. + -a, --autogen + Start by rerunning autogen & configure. + -r, --regenerate-descriptors + Run generate_descriptor_proto.sh to regenerate all the checked in + proto sources. + -j #, --jobs # + Force the number of parallel jobs (useful for debugging build issues). + --core-only + Skip some of the core protobuf build/checks to shorten the build time. + --skip-xcode + Skip the invoke of Xcode to test the runtime on both iOS and OS X. + --skip-xcode-ios + Skip the invoke of Xcode to test the runtime on iOS. + --skip-xcode-debug + Skip the Xcode Debug configuration. + --skip-xcode-release + Skip the Xcode Release configuration. + --skip-xcode-osx + 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 +} + +header() { + echo "" + echo "========================================================================" + echo " ${@}" + echo "========================================================================" +} + +# Thanks to libtool, builds can fail in odd ways and since it eats some output +# it can be hard to spot, so force error output if make exits with a non zero. +wrapped_make() { + set +e # Don't stop if the command fails. + make $* + MAKE_EXIT_STATUS=$? + if [ ${MAKE_EXIT_STATUS} -ne 0 ]; then + echo "Error: 'make $*' exited with status ${MAKE_EXIT_STATUS}" + exit ${MAKE_EXIT_STATUS} + fi + set -e +} + +NUM_MAKE_JOBS=$(/usr/sbin/sysctl -n hw.ncpu) +if [[ "${NUM_MAKE_JOBS}" -lt 2 ]] ; then + NUM_MAKE_JOBS=2 +fi + +DO_AUTOGEN=no +DO_CLEAN=no +REGEN_DESCRIPTORS=no +CORE_ONLY=no +DO_XCODE_IOS_TESTS=yes +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 ) + printUsage + exit 0 + ;; + -c | --clean ) + DO_CLEAN=yes + ;; + -a | --autogen ) + DO_AUTOGEN=yes + ;; + -r | --regenerate-descriptors ) + REGEN_DESCRIPTORS=yes + ;; + -j | --jobs ) + shift + NUM_MAKE_JOBS="${1}" + ;; + --core-only ) + CORE_ONLY=yes + ;; + --skip-xcode ) + DO_XCODE_IOS_TESTS=no + DO_XCODE_OSX_TESTS=no + ;; + --skip-xcode-ios ) + DO_XCODE_IOS_TESTS=no + ;; + --skip-xcode-osx ) + DO_XCODE_OSX_TESTS=no + ;; + --skip-xcode-debug ) + DO_XCODE_DEBUG=no + ;; + --skip-xcode-release ) + DO_XCODE_RELEASE=no + ;; + --skip-objc-conformance ) + DO_OBJC_CONFORMANCE_TESTS=no + ;; + --xcode-quiet ) + XCODE_QUIET=yes + ;; + -*) + echo "ERROR: Unknown option: ${1}" 1>&2 + printUsage + exit 1 + ;; + *) + echo "ERROR: Unknown argument: ${1}" 1>&2 + printUsage + exit 1 + ;; + esac + shift +done + +# Into the proto dir. +cd "${ProtoRootDir}" + +# if no Makefile, force the autogen. +if [[ ! -f Makefile ]] ; then + DO_AUTOGEN=yes +fi + +if [[ "${DO_AUTOGEN}" == "yes" ]] ; then + header "Running autogen & configure" + ./autogen.sh + ./configure \ + CPPFLAGS="-mmacosx-version-min=10.9 -Wunused-const-variable -Wunused-function" \ + CXXFLAGS="-Wnon-virtual-dtor -Woverloaded-virtual" +fi + +if [[ "${DO_CLEAN}" == "yes" ]] ; then + header "Cleaning" + wrapped_make clean + if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then + XCODEBUILD_CLEAN_BASE_IOS=( + xcodebuild + -project objectivec/ProtocolBuffers_iOS.xcodeproj + -scheme ProtocolBuffers + ) + if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then + "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Debug clean + fi + if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then + "${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Release clean + fi + fi + if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then + XCODEBUILD_CLEAN_BASE_OSX=( + xcodebuild + -project objectivec/ProtocolBuffers_OSX.xcodeproj + -scheme ProtocolBuffers + ) + if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then + "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Debug clean + fi + if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then + "${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean + fi + fi +fi + +if [[ "${REGEN_DESCRIPTORS}" == "yes" ]] ; then + header "Regenerating the descriptor sources." + ./generate_descriptor_proto.sh -j "${NUM_MAKE_JOBS}" +fi + +if [[ "${CORE_ONLY}" == "yes" ]] ; then + header "Building core Only" + wrapped_make -j "${NUM_MAKE_JOBS}" +else + header "Building" + # Can't issue these together, when fully parallel, something sometimes chokes + # at random. + wrapped_make -j "${NUM_MAKE_JOBS}" all + wrapped_make -j "${NUM_MAKE_JOBS}" check + # Fire off the conformance tests also. + cd conformance + wrapped_make -j "${NUM_MAKE_JOBS}" test_cpp + cd .. +fi + +# Ensure the WKT sources checked in are current. +objectivec/generate_well_known_types.sh --check-only -j "${NUM_MAKE_JOBS}" + +header "Checking on the ObjC Runtime Code" +objectivec/DevTools/pddm_tests.py +if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.[hm] ; then + echo "" + echo "Update by running:" + echo " objectivec/DevTools/pddm.py objectivec/*.[hm] objectivec/Tests/*.[hm]" + 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. + 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 + exit 10 + ;; + 7.* ) + echo "ERROR: Xcode 7.x no longer supported for building, please use 8.0 or higher." 1>&2 + exit 11 + ;; + 8.0* ) + # The 8.* device seem to hang and never start under Xcode 8. + XCODEBUILD_TEST_BASE_IOS+=( + -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=10.0" # 64bit + ) + ;; + 8.[1-3]* ) + XCODEBUILD_TEST_BASE_IOS+=( + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit + ) + ;; + 9.[0-2]* ) + XCODEBUILD_TEST_BASE_IOS+=( + -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit + # 9.0-9.2 all seem to often fail running destinations in parallel + -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 "" + echo "ATTENTION: Time to update the simulator targets for Xcode ${XCODE_VERSION}" + echo "" + echo "Build aborted!" + exit 2 + ;; + esac + if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then + header "Doing Xcode iOS build/tests - Debug" + "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Debug test + fi + if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then + header "Doing Xcode iOS build/tests - Release" + "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Release test + fi + # Don't leave the simulator in the developer's face. + killall Simulator 2> /dev/null || true +fi +if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then + XCODEBUILD_TEST_BASE_OSX=( + xcodebuild + -project objectivec/ProtocolBuffers_OSX.xcodeproj + -scheme ProtocolBuffers + # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported. + -destination "platform=OS X,arch=x86_64" # 64bit + ) + 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 + exit 10 + ;; + 7.* ) + echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2 + echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2 + exit 11 + ;; + esac + if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then + header "Doing Xcode OS X build/tests - Debug" + "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Debug test + fi + if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then + header "Doing Xcode OS X build/tests - Release" + "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Release test + fi +fi + +if [[ "${DO_OBJC_CONFORMANCE_TESTS}" == "yes" ]] ; then + header "Running ObjC Conformance Tests" + cd conformance + wrapped_make -j "${NUM_MAKE_JOBS}" test_objc + cd .. +fi diff --git a/third_party/protobuf/3.6.0/objectivec/DevTools/pddm.py b/third_party/protobuf/3.6.0/objectivec/DevTools/pddm.py new file mode 100644 index 0000000000..0b5b7b406d --- /dev/null +++ b/third_party/protobuf/3.6.0/objectivec/DevTools/pddm.py @@ -0,0 +1,690 @@ +#! /usr/bin/python +# +# Protocol Buffers - Google's data interchange format +# Copyright 2015 Google Inc. All rights reserved. +# https://developers.google.com/protocol-buffers/ +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""PDDM - Poor Developers' Debug-able Macros + +A simple markup that can be added in comments of source so they can then be +expanded out into code. Most of this could be done with CPP macros, but then +developers can't really step through them in the debugger, this way they are +expanded to the same code, but you can debug them. + +Any file can be processed, but the syntax is designed around a C based compiler. +Processed lines start with "//%". There are three types of sections you can +create: Text (left alone), Macro Definitions, and Macro Expansions. There is +no order required between definitions and expansions, all definitions are read +before any expansions are processed (thus, if desired, definitions can be put +at the end of the file to keep them out of the way of the code). + +Macro Definitions are started with "//%PDDM-DEFINE Name(args)" and all lines +afterwards that start with "//%" are included in the definition. Multiple +macros can be defined in one block by just using a another "//%PDDM-DEFINE" +line to start the next macro. Optionally, a macro can be ended with +"//%PDDM-DEFINE-END", this can be useful when you want to make it clear that +trailing blank lines are included in the macro. You can also end a definition +with an expansion. + +Macro Expansions are started by single lines containing +"//%PDDM-EXPAND Name(args)" and then with "//%PDDM-EXPAND-END" or another +expansions. All lines in-between are replaced by the result of the expansion. +The first line of the expansion is always a blank like just for readability. + +Expansion itself is pretty simple, one macro can invoke another macro, but +you cannot nest the invoke of a macro in another macro (i.e. - can't do +"foo(bar(a))", but you can define foo(a) and bar(b) where bar invokes foo() +within its expansion. + +When macros are expanded, the arg references can also add "$O" suffix to the +name (i.e. - "NAME$O") to specify an option to be applied. The options are: + + $S - Replace each character in the value with a space. + $l - Lowercase the first letter of the value. + $L - Lowercase the whole value. + $u - Uppercase the first letter of the value. + $U - Uppercase the whole value. + +Within a macro you can use ## to cause things to get joined together after +expansion (i.e. - "a##b" within a macro will become "ab"). + +Example: + + int foo(MyEnum x) { + switch (x) { + //%PDDM-EXPAND case(Enum_Left, 1) + //%PDDM-EXPAND case(Enum_Center, 2) + //%PDDM-EXPAND case(Enum_Right, 3) + //%PDDM-EXPAND-END + } + + //%PDDM-DEFINE case(_A, _B) + //% case _A: + //% return _B; + + A macro ends at the start of the next one, or an optional %PDDM-DEFINE-END + can be used to avoid adding extra blank lines/returns (or make it clear when + it is desired). + + One macro can invoke another by simply using its name NAME(ARGS). You cannot + nest an invoke inside another (i.e. - NAME1(NAME2(ARGS)) isn't supported). + + Within a macro you can use ## to cause things to get joined together after + processing (i.e. - "a##b" within a macro will become "ab"). + + +""" + +import optparse +import os +import re +import sys + + +# Regex for macro definition. +_MACRO_RE = re.compile(r'(?P\w+)\((?P.*?)\)') +# Regex for macro's argument definition. +_MACRO_ARG_NAME_RE = re.compile(r'^\w+$') + +# Line inserted after each EXPAND. +_GENERATED_CODE_LINE = ( + '// This block of code is generated, do not edit it directly.' +) + + +def _MacroRefRe(macro_names): + # Takes in a list of macro names and makes a regex that will match invokes + # of those macros. + return re.compile(r'\b(?P(?P(%s))\((?P.*?)\))' % + '|'.join(macro_names)) + + +def _MacroArgRefRe(macro_arg_names): + # Takes in a list of macro arg names and makes a regex that will match + # uses of those args. + return re.compile(r'\b(?P(%s))(\$(?P