* Improve exception throwing implementation in collections
* Implement RepeatedField.AddRange.
This fixes issue #1730.
* Optimize AddRange for sequences implementing ICollection
(Also fix a few more C# 6-isms.)
* Remove the overload for Add(RepeatedField<T>)
We now just perform the optimization within AddRange itself.
This is a breaking change in terms of "drop in the DLL", but is
source compatible, which should be fine.
Uses Google's C++ library for .proto parsing and uPB for protobuf
encoding/decoding; it supports both proto2 and proto3 syntax and
encoding/decoding is more than 10 times faster than pure-Perl
Google::ProtocolBuffers.
As bazel folks are looking at getting auto generation of module maps going and
the importing of sources files causes issues there. We were only do it to
hack around some of the apple linker behaviors around objc classes and
categories, but even that isn't complete and CocoaPods was already doing -ObjC,
and developers not using pods could have still needed it to ensure everything
was linked anyways; so drop the hack of importing sources.
A couple of small tweaks were needed to fix test failures that were
inadvertently introduced in the last down integration. I also had to add
the map.js file which was missing.
Add the `nullable` qualifier to return types of Objective-C methods that
can return a nil due to errors. This change makes these methods
compatible with the Swift 2 try-catch syntax.
I think this has caught everything.
I've left a stub for attributes to be applied to the types themselves, but we don't currently need anything.
Follow-up commit will include the changes to generated code itself.
Fixes#1671.
- Correct some cases sources were compiled into the static lib and the tests.
- Enable Xcodes code coverage support on the unittests. We aren't complete on
coverage, but having the data always there should make it easier to chip away
at this going forward.
- Drop method in tests that isn't used, wire up a validator in another test.
There was a twist code path (that some times showed up due to what happened to
be in memory in failure cases), that would cast a bogus wire type into the
enum, and then fall through switch statements.
Resolve this by validating all wire types when parsing tags and throwing the
error at that point so it can't enter the system.
As added safety, stick in a few asserts for apis that get passed tags to ensure
they also are only seeing valid data.
Bonus: Tweak the parsing loop to skip some work when we get the end marker
(zero tag) instead of still looping through all the fields.