* Fix a typo
* Fix lots of spelling errors
* Fix a few more spelling mistakes
* s/parsable/parseable/
* Don't touch the third party files
* Cloneable is the preferred C# term
* Copyable is the preferred C++ term
* Revert "s/parsable/parseable/"
This reverts commit 534ecf7675.
* Revert unparseable->unparsable corrections
There are have been a few issues around people using case sensitive file systems
what Xcode/clang does when looking at the paths. In attempts to solve one set of
warnings, new warnings/errors happened in different setup. So, to hopefully put
these problem away for got, move the WKTs to be at the same level as the other
headers.
- Revert "Override CocoaPods module to lowercase (#6464)"
This reverts commit 479ba8226b.
- Move WKTs to the objectivec directory and make the old headers shim back to
the new locations.
- Update objectivec/generate_well_known_types.sh to check them one at a time
and to deal with the new locations for them.
Fixes#6803
This should reduce binary size slightly, small performance improvement, and improve linkage by forcing references to all used classes.
Note that this maintains backwards compatibility for sources generated by older protoc for the time being. If you want the benefits
you will need to recompile your protos with the newer protoc.
VLAs complicate static analysis and bloat stack size. Replace VLA allocation
with calls to malloc and free. This will alos the code to build with -Wvla.
Some protos have enum values of "FOO" and "Foo", which the ObjC generation
then makes into the same thing. Just skip generating the enum element for
the duplicate as it would be a compile error because of the name collision.
The descriptors are still generated to support reflection and TextFormat
more completely.
Just like fields, some extension fieldnames can be named such that they appear
to have meaning to ARC. Add the annotation to the compiler will get things
correct.
Add a bunch of extensions to allow inspection on generation to ensure things
are correct.
In some cases proto files that want/need to use the objc_class_prefix option have
types that already have the prefix on a subset of their names. In this case we don't
want to duplicate the prefix.
Added tests for this (and prefixes in general).
We have code for converting C/C++/Objc keywords that appear in protos
to convert them so that they can be compiled.
One of the things we need to be careful of is accidentally overriding methods
that Apple declares in NSObject. It turns out that we have run into issues
where we conflict with "hidden" methods in NSObject or methods added by
categories. method_dump.sh collects all of the methods we care about for
macOS and iOS and dumps them into objectivec_nsobject_methods.h which
is then included in objectivec_helpers.cc as part of the build.
Added a pile of tests to verify that conversions are happening as expected.
* objectivec: Quash -Wself-assign
* objectivec: Set -Wno-vla when building
Objective-C protobuf uses VLAs for performance reasons. Ensure Clang
doesn’t complain about them.
Added new API to GPBEnumDescriptor to enable introspection of enum values.
Refactored implementation so that this contains a minimum of added code.
Clarified comments regarding behavior in the presence of the alias_allowed option.
Added unit tests for new functionality and for the alias case.
The tests can run as what Apple calls a Logic Test (under xctest), which means
it doesn't have to load an full UI App under the simulator, which speeds things
up a fair amount.
To ensure all headers aren't dependent on other things being imported
before/after them, make a source that just imports each header and add
it to the unittesting target, that way we ensure it can be included on
its own with ordering issues.
Also do this testing with a few generated headers that aren't part of
the library to help ensure the different generated imports needed are
complete.
- Fix up -copyWithZone: to not leave the two registries sharing
some of the storage by using -addExtensions:.
- Improve -addExtensions: to clone the sub dict when there is
nothing to merge into.
- A ExtensionRegistry unittests.
- Update project schemes to not have extra things in perf scheme.