aboutsummaryrefslogtreecommitdiff
path: root/objectivec
Commit message (Collapse)AuthorAgeFilesLines
* Automated testing tweaks for ObjCThomas Van Lenten2016-06-131-20/+49
| | | | | | | | | | | | | | | - Move the ObjC tests into the list and exclude them on linux, this will change where in the order they start, since they are longer, it will have other things run in parallel instead of them ending up last and taking the longest. - Switch to the Xcode 7.3 image. - Drop the use of xctool and stream line things through the full_mac_build.sh script. This means we end up with only one build script instead of two. - Tweaks to the mac build script: - Make iOS Xcode version support explicit - Support Debug/Release only building - Change the OS X min parallel count to 2 to better deal with VMs. - Split the travis ios tests into the two Xcode Configurations as the logs are choking travis.
* Better support for using the proto library from a framework.Thomas Van Lenten2016-06-1323-46/+339
| | | | | | | | | | | | | | - Add generator constant for the default framework name. - Add generator api for making the CPP symbol from the name. - Add generator api to see if it is a bundled proto file. - Output a CPP conditional and two imports for the core library headers. - Add helper for generating the #import for file headers to deal with the framework imports. - Add a reference from the unittests to a WKT to use that to inspect how imports generate. - Update the podspec to define the CPP symbol and require pods 1.0 (or later). Fixes https://github.com/google/protobuf/issues/1457
* Make the CocoaPods integration tests more robustThomas Van Lenten2016-06-135-14/+36
| | | | | | | - Env solution doesn't seem to always work, use template pod files and copy them in place instead. - Flush the pods cache before and after runs. - Make pod install verbose to have the info incase something goes wrong.
* Add shared schemes for the CocoaPods integration testsThomas Van Lenten2016-06-132-0/+182
| | | | | Otherwise the projects have to be opened once to create user schemes for the command line builds to work.
* Expand the OS X/Xcode gitignoresThomas Van Lenten2016-06-131-0/+23
| | | | | - Add the folder CocoaPods will add to the root folder. - Move and expand the entries in the objectivec directory.
* CocoaPod Integration TestsThomas Van Lenten2016-06-1323-0/+2063
| | | | | | | | - Add an Xcode 6.3 created default iOS Project. - Add an Xcode 6.3 created default OS X Project. - Add Podfiles to for both that use Protobufs from within the tree. - Add a script to run the tests (and cleanup) to help confirm the state of the Protobuf.podspec and sources.
* Declare an init and avoid passing NULL to initWithValue:count:Thomas Van Lenten2016-05-102-65/+90
| | | | Fixes https://github.com/google/protobuf/issues/1189
* Update descritpor protos for objcJisi Liu2016-04-2922-3863/+3
|
* Merge the script fix.Jisi Liu2016-04-291-1/+1
|\
| * Fix cp -r usage to be portable.Jisi Liu2016-04-291-1/+1
| | | | | | | | | | | | | | | | cp -r foo/ bar/ in linux will create a bar/foo directoy. In the objectivec generate descritpor case, well known types will be created in objectivec/google/google/protobuf/.. if the command is run under linux. Adding the trailing period fixes the behavior inconsistency.
* | Merge branch 'master' of github.com:google/protobufJisi Liu2016-04-283-5/+131
|\|
| * Fix up -hash/-isEqual: for bool storage.Thomas Van Lenten2016-04-273-5/+114
| | | | | | | | | | | | | | Both methods weren't checking the has_bits (where the bools are stored), so it resulted in invalid results. Add a test that should shake out something like this in the future also.
| * Proper checking of enum with non zero defaultThomas Van Lenten2016-04-262-0/+17
| | | | | | | | | | | | | | | | | | proto2 syntax allows the first enum to have a non zero value. This means any field using that default has a non zero default without having an explicit default being set. So when deciding what runtime info is needed, don't rely on an explicit default, always check that the values aren't zero. Fixes https://github.com/google/protobuf/issues/1453
* | Down integrate from Google internal.Jisi Liu2016-04-2820-0/+3862
|/
* ObjC support for failing the build in the generated WKTs are out of dateThomas Van Lenten2016-04-202-31/+38
| | | | | | | | - Always generated into a temp directory so we can see if things changed. - Add a flag to control exiting with error when stale vs updating. This should let the continuous builds error out when ObjC needs to have the checked in sources updated.
* Regenerate the WKT to pick up current changes to the proto files.Thomas Van Lenten2016-04-1920-5/+160
|
* Fix comment typoThomas Van Lenten2016-04-191-15/+15
|
* Merge pull request #1391 from thomasvl/string_tweaksThomas Van Lenten2016-04-062-9/+47
|\ | | | | ObjC String followups: one test case only addition, behavior change for invalid UTF-8
| * Error during parsing for invalid UTF-8 instead of dropping dropping data.Thomas Van Lenten2016-04-052-9/+9
| | | | | | | | | | | | | | This seems to be some code evolution side effects. Back when there was a custom string class, we couldn't really error when we finally saw the string was bad so we had to return the empty string, but now that full validation is done up front, it can error out.
| * Add tests to ensure we read strings with BOMs so we don't forget about ↵Thomas Van Lenten2016-04-051-0/+38
| | | | | | | | lessons of the past.
* | Updating Xcode Settings to use iOS 9.3Geoffrey Wiseman2016-04-061-0/+8
|/ | | | Update the simulators used for some tests under Xcode 7.3 to be iOS 9.3.
* Add -position and -isAtEnd for use when manually parsing input streams.Thomas Van Lenten2016-04-012-0/+17
|
* The message was autoreleased, the -releases are an over release.Thomas Van Lenten2016-03-241-2/+0
|
* Only create the readonlySemaphore on demand.Thomas Van Lenten2016-03-213-3/+19
| | | | | | This will lower the amount of dispatch_semaphores created per Message when the full object tree isn't walked in a way that would require them to be created. Uses a dispatch_once_t for one time init of the dispatch_semaphore.
* Shrink ObjC overhead (generated size and some runtime sizes)Thomas Van Lenten2016-03-1739-4878/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: This is a binary breaking change as structure sizes have changed size and/or order. - Drop capturing field options, no other options were captured and other mobile targeted languages don't try to capture this sort information (saved 8 bytes for every field defined (in static data and again in field descriptor instance size data). - No longer generate/compile in the messages/enums in descriptor.proto. If developers need it, they should generate it and compile it in. Reduced the overhead of the core library. - Compute the number of has_bits actually needs to avoid over reserving. - Let the boolean single fields store via a has_bit to avoid storage, makes the common cases of the instance size smaller. - Reorder some flags and down size the enums to contain the bits needed. - Reorder the items in the structures to manually ensure they are are packed better (especially when generating 64bit code - 8 bytes for every field, 16 bytes for every extension, instance sizes 8 bytes also). - Split off the structure initialization so when the default is zero, the generated static storage doesn't need to reserve the space. This is batched at the message level, so all the fields for the message have to have zero defaults to get the saves. By definition all proto3 syntax files fall into this case but it also saves space for the proto2 that use the standard defaults. (saves 8 bytes of static data for every field that had a zero default) - Don't track the enums defined by a message. Nothing in the runtime needs it and it was just generation and runtime overhead. (saves 8 bytes per enum) - Ensure EnumDescriptors are started up threadsafe in all cases. - Split some of the Descriptor initialization into multiple methods so the generated code isn't padded with lots of zero/nil args. - Change how oneof info is feed to the runtime enabling us to generate less static data (8 bytes saved per oneof for 64bit). - Change how enum value informat is capture to pack the data and only decode it if it ends up being needed. Avoids padding issues causing bloat of 64bit, and removes the needs for extra pointers in addition to the data (just the data and one pointer now).
* Fix up handing of fields with leading names that should be all caps.Thomas Van Lenten2016-03-082-0/+30
| | | | Add a compile test to confirm things are working as expected.
* HeaderDoc support in the library and generated sourcesThomas Van Lenten2016-03-0728-1343/+1952
| | | | | | | - Convert most of the core library headers over to HeaderDoc format. - Switch the generated comments over to HeaderDoc. - Create GPBCodedOutputStream_PackagePrivate and move some things into there that should be more internal.
* Support ObjC Generic CollectionsThomas Van Lenten2016-02-1817-358/+351
| | | | | | | - Extend GPB*ObjectDictionary to support generic syntax. - Update the generator to output generics so the enclosed type is exposed for compiler checks. - Use generics in a the public interfaces. - Update the generated sources that are checked in.
* Bump up travis to Xcode 7.2Thomas Van Lenten2016-02-161-1/+9
| | | | | - Update simulator versions used. - Mark the iOS tests as flaky while trying to dig out the root cause.
* Rewrap the lineDongjoon Hyun2016-02-111-2/+1
|
* Remove redundant `the` in comments.Dongjoon Hyun2016-02-032-2/+2
|
* Integrate from google internal.Jisi Liu2016-01-292-0/+201
| | | | | Java files are moved to un-do the hack in the prevous commit, which moved the java files to the original position for integration.
* Merge pull request #1129 from dongjoon-hyun/fix_typos_in_README_and_CHANGESFeng Xiao2016-01-121-1/+1
|\ | | | | Fix typos in README.md/CHANGES.txt
| * Fix typos in README.md/CHANGES.txtDongjoon Hyun2016-01-111-1/+1
| |
* | Release the semaphore in dealloc, fixing leak.Thomas Van Lenten2016-01-121-0/+1
|/
* Remove the stale reference to test no longer around, and keep the ↵Thomas Van Lenten2016-01-072-6/+6
| | | | performance test limited to just performance tests.
* Update objectivec/google/protobuf/Type.pbobjc.mThomas Van Lenten2016-01-051-0/+13
| | | | | commit e841bac4fcf47f809e089a70d5f84ac37b3883df seems to have updated the generated .pbobjc.h but not the .pbobjc.m to match.
* Have the tests rely on the autocreator behaviors.Thomas Van Lenten2016-01-054-13/+1
| | | | | Incase developers look at the tests for examples, have them rely on the autocreators also.
* Merge branch master into v3.0.0-beta-2Feng Xiao2015-12-2110-873/+53
|\
| * Drop all use of OSSpinLockThomas Van Lenten2015-12-1710-873/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Apple engineers have pointed out that OSSpinLocks are vulnerable to live locking on iOS in cases of priority inversion: . http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/ . https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html - Use a dispatch_semaphore_t within the extension registry. - Use a dispatch_semaphore_t for protecting autocreation within messages. - Drop the custom/internal GPBString class since we don't have really good numbers to judge the locking replacements and it isn't required. We can always bring it back with real data in the future.
* | Down-integrate from internal code base.Feng Xiao2015-12-114-31/+36
|/
* Update the min toolchain for iOS/OS X to be Xcode 7Thomas Van Lenten2015-12-1012-40/+80
| | | | | | | - Let Xcode update the projects, schemes, and info.plists. - Add workaround for shallow analyzer issues in current Xcode versions (deep analyze gets things correct). - Tweak the Swift based tests to avoid warnings from Xcode 7's XCTest using optionals for autoenclosure results. - No longer tag the ObjC iOS travis test as flaky, xctool seems to manage the simulator pretty well.
* Use compiler provided static assert and avoid tripping unused-local-typedef ↵Thomas Van Lenten2015-12-081-4/+9
| | | | warnings.
* Enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION for the projects.Thomas Van Lenten2015-12-078-53/+156
|
* Tweak the error message as the generate is in the core binary these days.Thomas Van Lenten2015-12-0211-11/+11
|
* Merge pull request #1020 from thomasvl/block_nilThomas Van Lenten2015-12-021-5/+136
|\ | | | | Check and throw errors for nil values/keys (like NSDictionary).
| * Check and throw errors for nil values/keys (like NSDictionary).Thomas Van Lenten2015-12-021-5/+136
| |
* | Ensure the conformance build of objc code is using the Mac OS X SDK andThomas Van Lenten2015-12-021-1/+3
|/
* Update GPBProtocolBuffers.hOsman Cihangir2015-11-241-0/+1
|
* Set the stream limit to the length of the data.Thomas Van Lenten2015-11-231-5/+1
| | | | - Mark all conformance tests as now passing.