aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/objectivec
Commit message (Collapse)AuthorAge
* Fixed a Visual Studio 2017 build error. (#4488)Gravatar Ronny Krüger2018-04-16
| | | | | | | | | | | | | | | | The current 15.6.x versions of Visual Studio 2017 contain a bug that prevent them from compiling the following construct under certain conditions: std::unique_ptr<std::unique_ptr<Foo> []> foos; This will fail to compile if Foo is an abstract class. To work-around the problem the whole construct was change into: std::vector<std::unique_ptr<Foo>> foos; This not only fixes the compiler error but is also more readable than previous version.
* Don't generate imports for the WKTs unless generating the WKTs.Gravatar Thomas Van Lenten2018-04-02
| | | | | Since the generated header import GPBProtocolBuffers.h, there is no need to generate imports for the WKTs as they will have already been imported.
* Trim imports for bundled generated protos.Gravatar Thomas Van Lenten2018-04-02
| | | | | | | | To avoid a cycle between headers, have the WKTs use minimal imports instead of using the helper to get everything from the library. Fixes https://github.com/google/protobuf/issues/4301 Fixes https://github.com/google/protobuf/issues/4403
* Deleted scoped_ptr.hGravatar Adam Cozzette2018-03-14
| | | | | We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr.
* Remove stray indent on normal imports.Gravatar Thomas Van Lenten2018-02-08
|
* Fix to use "nil" instead of "NULL" for objc objects.Gravatar Thomas Van Lenten2018-01-31
|
* Removed using statements from common.hGravatar Adam Cozzette2018-01-26
| | | | | | These statements pulled a bunch of symbols from the std namespace into the global namespace. This commit removes all of them except for std::string, which is a bit trickier to remove.
* Add an explicit import of stdatomic.h.Gravatar Thomas Van Lenten2018-01-25
| | | | | | | | | The generated code for enums needs atomics support, so generate the import instead of relying on it via transitive imports. This will make future changes to this likely likely to break generated code and runtime support are mixed. Followup to https://github.com/google/protobuf/pull/4184.
* Migrate away from deprecated OSAtomic APIs. (#4184)Gravatar Jonathan Dierksen2018-01-22
| | | | * Migrate away from deprecated OSAtomic APIs.
* Support win32 long path for cross compiled buildGravatar Jisi Liu2017-11-10
|
* Make win32_io only for MSVCGravatar Jisi Liu2017-08-11
| | | | | This excludes cygwin and mingw from using the self implemented functions.
* Merge from masterGravatar Jisi Liu2017-07-25
|
* Add std:: namespace prefix to set and map (#3332)Gravatar tanderson-google2017-07-09
| | | * Remove using std::{set,map}
* Add initialized as a reserved keyword as that's the actual property nameGravatar Sergio Campama2017-06-29
|
* Remove "using namespace std" from stubs/common.hGravatar Adam Cozzette2017-04-26
| | | | | | | | This prevents the contents of the std namespace from being effectively pulled into the top-level namespace in all translation units that include common.h. I left in individual using statements for a few common things like std::set and std::map, because it did not seem worth going through the churn of updating the whole codebase to fix those right now.
* Merge pull request #2227 from KindDragon/3.1.xGravatar Feng Xiao2016-12-16
|\ | | | | Missed LIBPROTOC_EXPORT for GRPC added
* | Improve ObjC deprecated annotation support.Gravatar Thomas Van Lenten2016-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Check the parent file options for deprecation when deciding to tag Messages and Enums as deprecated. - Within the generated source push/pop the warning for implementing deprecated things around a deprecated class implementation. - Annotate the methods generated for extension fields as deprecated. - Add a testing .proto file that covers deprecated fields, messages, enums, enum values and compile it into the unittests to confirm things compile cleanly. - Add a testing .proto file that uses the file level option to make everything deprecated and compile it into the unittests to confirm things compile cleanly.
| * LIBPROTOC_EXPORT added to others functions in csharp_names.h and ↵Gravatar Arkadiy Shapkin2016-12-01
| | | | | | | | objectivec_helpers.h
| * Missed LIBPROTOC_EXPORT for GRPC addedGravatar Arkadiy Shapkin2016-12-01
|/
* Merge pull request #2112 from pherl/mergeGravatar Jisi Liu2016-09-15
|\ | | | | Merge 3.0.x into master
* | Update the ObjC version checks to support a min and current version.Gravatar Thomas Van Lenten2016-09-15
| | | | | | | | | | | | | | | | | | - Capture the version used to generated. - Check at compile time and runtime that generated code isn't from a newer version, also check that the min version required is also supported. - Keep the old constants/macros/functions to special case the last version that was working so those generated sources still work until we decide otherwise.
| * Merge remote-tracking branch 'origin/3.0.x' into mergeGravatar Jisi Liu2016-09-14
|/|
* | Merge pull request #2090 from guoxiao/findGravatar Feng Xiao2016-09-09
|\ \ | | | | | | include std::find()
* \ \ Merge pull request #1970 from thomasvl/objc_any_helpersGravatar Thomas Van Lenten2016-09-09
|\ \ \ | | | | | | | | Objc any helpers
* | | | Support the -Wassign-enum compiler flag. (#2085)Gravatar Sergio Campamá2016-09-08
| | | | | | | | | | | | | | | | Support the -Wassign-enum compiler flag.
| * | | Add ObjC helpers for Any WKT.Gravatar Thomas Van Lenten2016-09-08
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Capture the ObjC prefix used when generating the the file. - Track the containing type on descriptors. - Mark descriptors where the message class name got a suffix added to it. - Expose a fullName property on Descriptors. - Add helpers for packing/unpacking Any messages. - Bump the ObjC runtime version number. Since we added methods and invoke them in the generated code, ensure the code is running against a matching version. Otherwise, someone could compile against headers, but run with a framework that is older and get unknown selector failures. This should trip clearer messaging. Fixes https://github.com/google/protobuf/issues/1674
| * / include std::find()Gravatar Guo Xiao2016-09-08
|/ /
* | Make Root's +extensionRegistry generation smarter.Gravatar Thomas Van Lenten2016-09-01
| | | | | | | | | | | | | | At generation time, walk the file's dependencies to see what really contains extensions so we can generate more minimal code that only links together the roots that provided extensions. Gets a bunch of otherwise noop code out of the call flow when the roots are +initialized.
* | Speed up ObjC Generation with large dependency treesGravatar Thomas Van Lenten2016-08-30
| | | | | | | | | | | | | | | | | | Don't create FileGenerators for each dep. FileGenerators will deeply create all the message, enum, and field generators; but those aren't needed when doing the imports for dependencies. Instead directly generate the imports off the FileDescriptors so no extra objects are created. The only other use was when chaining together the *Roots for the file extension registry, but that also can be generate off the name of the FileDescriptor directly.
* | Support GenerateAll().Gravatar Thomas Van Lenten2016-08-26
| | | | | | | | | | - Expect calls on GenerateAll() and not Generate(). - Parse the prefix validation file once, and then check all the files.
* | Remove the compiler options from ImportWriter.Gravatar Thomas Van Lenten2016-08-23
| | | | | | | | | | | | | | | | Breaks the tie of the ImportWriter to the ObjC generation, allow grpc to use a different extension and to relay the values they need for these. - Pass in the two framework options to the ctor. - Pass in the header extension to AddFile.
* | Move the ImportWriter into the ObjC Helpers.Gravatar Thomas Van Lenten2016-08-23
| | | | | | | | | | grpc likely needs to provide the same sorta handling, so expose the class so the logic can be reused.
* | Adds better support for protos without packages (#1979)Gravatar Sergio Campamá2016-08-19
| | | | | | | | Adds better support for protos without packages and more warnings on possible improvements
| * Fixes extra whitespace on generated comments. (#1950)Gravatar Sergio Campamá2016-08-17
| | | | | | | | Fixes extra whitespace on generated comments.
| * Adds support for appledoc in generated code. (#1928)Gravatar Sergio Campamá2016-08-17
| | | | | | | | | | | | Convert mapping of proto comments to appledoc format so they show up in Xcode and cocoadocs. Fixes https://github.com/google/protobuf/issues/1866
* | Fixes extra whitespace on generated comments. (#1950)Gravatar Sergio Campamá2016-08-12
| | | | | | | | Fixes extra whitespace on generated comments.
* | Adds support for appledoc in generated code. (#1928)Gravatar Sergio Campamá2016-08-09
| | | | | | | | | | | | Convert mapping of proto comments to appledoc format so they show up in Xcode and cocoadocs. Fixes https://github.com/google/protobuf/issues/1866
| * Add and fix C++ runtime docsGravatar Jisi Liu2016-08-02
|/
* Correctly sets the generate_for_named_framework option after parsing.Gravatar Sergio Campama2016-07-23
| | | | - Also updates the documentation with a bit more information.
* Fixes the parsing of the proto-framework map file.Gravatar Sergio Campama2016-07-22
| | | | | - Fixes memory issue where the pointer to the StringPiece would be allocated on the stack, and would mangle the output. - Fixes length of the file name when parsing the comma separated files.
* Use public methods to fetch oneofs in generated code.Gravatar Thomas Van Lenten2016-07-18
| | | | | | | | When building into frameworks, the generated code doesn't always have direct access to the proto internals. Instead of opening up the access, just use the public method to fetch the correct oneof. Fixes https://github.com/google/protobuf/issues/1789
* Fix spelling in strings and commentsGravatar Otto Kekäläinen2016-07-03
|
* Add new generation option for using proto sources from other frameworks.Gravatar Thomas Van Lenten2016-06-17
| | | | | | | | | | | | | | - Better docs in the generator for the different options that can be passed during an invoke of protoc. - Add named_framework_to_proto_path_mappings_path to pass the path to a file containing mappings of frameworks for different proto files. - Update the generation to use the mapping to change the #import directives it creates. Note: the changes in helpers is mostly moving code within the fine, and then a small change to expose the parsing so a passed on class can consume the line. Fixes https://github.com/google/protobuf/issues/1457
* Add support for generation sources into a framework.Gravatar Thomas Van Lenten2016-06-15
| | | | | | | | | | - Add a protoc objc option (generate_for_named_framework) to set the name of the framework all generated sources will be in. - Tweak some comments/naming to make it clear what is the Protobuf framework vs. the framework for generated code. - Update the objc README to document the new generation option to protoc. This is working towards https://github.com/google/protobuf/issues/1457.
* Add more warnings to for the ObjC runtime buildGravatar Thomas Van Lenten2016-05-25
| | | | | | | | | | | | | | Working on https://github.com/google/protobuf/issues/1599, specifically: - Turn on more warnings that the Xcode UI calls out with individual controls. - Manually add: -Wundef -Wswitch-enum - Manually add and then diable in the unittests because of XCTest's headers: -Wreserved-id-macro -Wdocumentation-unknown-command - Manually add -Wdirect-ivar-access, but disable it for the unittests and in the library code (via #pragmas to suppress it). This is done so proto users can enable the warning.
* Better support for using the proto library from a framework.Gravatar Thomas Van Lenten2016-05-24
| | | | | | | | | | | | | | - 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
* Proper checking of enum with non zero defaultGravatar Thomas Van Lenten2016-04-26
| | | | | | | | | 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
* Added deprecated option handling for objective-c generatorGravatar Oleg Vereshko2016-04-04
|
* Shrink ObjC overhead (generated size and some runtime sizes)Gravatar Thomas Van Lenten2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Merge pull request #1291 from sergiocampama/develGravatar Thomas Van Lenten2016-03-14
|\ | | | | Adds more information to Objective C error.