Commit graph

19 commits

Author SHA1 Message Date
Thomas Van Lenten
231b968b9c [ObjC] Don't rely so heavily on fwd decls in the headers.
This past reliance doesn't work well with Swift, and the sources
were trying to over hand optimize to minimize rebuilds, and that
likely isn't worth the trouble, so explicit imports.

The remaining places that still use them are where they are
needed within the header to deal with relationships between
the local definitions or where there is a cycle between the
headers and it allows either one to be imported first and still
get a complete definition in the using context.

PiperOrigin-RevId: 671379912
2024-09-05 08:27:50 -07:00
Protobuf Team Bot
01b0b8e06e Added a new public API bytesUntilLimit to GPBCodedInputStream.
This simply exposes preexisting logic. This read-only API is for convenience and doesn't reveal any information that was not already available. `[GPBCodedInputStream position]` is already a public API. The `limit` is known to the user because it's specified by them.

PiperOrigin-RevId: 635502694
2024-05-20 10:44:46 -07:00
Joshua Haberman
44bd65b2d3 Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
PiperOrigin-RevId: 563894040
2023-09-08 18:47:26 -07:00
Protobuf Team Bot
a185a6ea8a [ObjC] Mark classes that shouldn't be subclassed as such.
Several of the classes vended by the runtime don't really support subclassing,
so mark them as such to get compiler enforcement just in case.

PiperOrigin-RevId: 505221732
2023-01-27 15:21:05 -08:00
Thomas Van Lenten
5d0b2175c3 Format the headers. 2022-09-23 14:09:00 -04:00
Thomas Van Lenten
5392dc1dd4 [ObjC] Use a real import for GPBExtensionRegistry.
The fwd decls can lead to ambiguity for downstream users, so use a full import
to avoid the potential issues.
2022-09-19 17:03:40 -04:00
Thomas Van Lenten
6a28393f08 Keep the class forward declaration also.
Some users might be depended on these, so until everything is flipped to
explicit imports, need to still provide the class declaration so the proto isn't
a breaking change.
2022-09-19 14:10:56 -04:00
Thomas Van Lenten
f191ab0f35 Provide a protocol for GPBExtensionRegistry's lookup support.
This allows some to use an alternative registry if they have a different
implementation.

This is really just wiring though the change to use the GPBExtensionRegistry
protocol vs the concrete GPBExtensionRegistry through the other apis.
2022-09-19 11:38:33 -04:00
Mike Kruskal
701dd83594
Integrate from Piper for C++, Java, and Python (#10429)
* Fixing typos

* Revert new files that were deleted by sync script

* Fix CMake breakages

* bump upb version

* Sync from Piper @468772608

PROTOBUF_SYNC_PIPER

* Adding abseil to include path for python C++ extension

* Adding abseil linkage for python C++ extension

* Fixing linkage order
2022-08-20 14:22:08 -07:00
Sergio Campamá
d58b92ae51 Adds pushLimit: and popLimit: into GPBCodedInputStream (#2297)
Adds pushLimit: and popLimit: into GPBCodedInputStream
2016-10-27 16:06:45 -04:00
Sergio Campamá
32fadc0d49 Migrating documentation of the ObjectiveC runtime code to appledoc. (#1867)
Work for #1866 

Migrates all the public class docs over to appledoc format.  While Xcode is fine with blank lines in `///` comments, appledoc (used by cocoadocs) isn't and was leaving a bunch of info off the doc pages.

The generator still needs to be updated to do this also; that will be a follow up CL.
2016-08-08 10:15:02 -04:00
Sergio Campamá
e34c09182e Improving the granularity parsing errors (#1623)
Add more context to GPBCodedInputStream failures.
Have GPBMessage parsing apis extract out the GPBCodedInputStream information and expose it.
Update HeaderDocs with pointers to all error domains/codes.
Expand the unittests to cover the full set of errors reported.

Fixes https://github.com/google/protobuf/issues/1618
2016-06-02 14:14:26 -04:00
Thomas Van Lenten
c8a440dfb6 Add more warnings to for the ObjC runtime build
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.
2016-05-25 16:42:31 -04:00
Thomas Van Lenten
331cee5022 Add -position and -isAtEnd for use when manually parsing input streams. 2016-04-01 12:26:15 -04:00
Thomas Van Lenten
36650a07cf HeaderDoc support in the library and generated sources
- 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.
2016-03-07 12:07:03 -05:00
Thomas Van Lenten
8c88957ef3 Add nonnil markup to ObjC library.
Add the clang annotations to the objc library and generated code to help with Swift bridging and compiler checks.
2015-06-16 17:04:50 -04:00
Thomas Van Lenten
d846b0b059 Beta quality drop of Objective C Support.
- Add more to the ObjC dir readme.
- Merge the ExtensionField and ExtensionDescriptor to reduce overhead.
- Fix an initialization race.
- Clean up the Xcode schemes.
- Remove the class/enum filter.
- Remove some forced inline that were bloating things without proof of performance wins.
- Rename some internal types to avoid conflicts with the well know types protos.
- Drop the use of ApplyFunctions to the compiler/optimizer can do what it wants.
- Better document some possible future improvements.
- Add missing support for parsing repeated primitive fields in packed or unpacked forms.
- Improve -hash.
- Add *Count for repeated and map<> fields to avoid auto create when checking for them being set.
2015-06-08 17:17:22 -04:00
Thomas Van Lenten
1dcc329427 Objective C Second Alpha Drop
- Style fixups in the code.
- map<> serialization fixes and more tests.
- Autocreation of map<> fields (to match repeated fields).
- @@protoc_insertion_point(global_scope|imports).
- Fixup proto2 syntax extension support.
- Move all startup code to +initialize so it happen on class usage and not app startup.
- Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds.
2015-05-22 14:27:31 -04:00
Thomas Van Lenten
30650d81d9 Alpha 1 drop of Google's Objective C plugin and runtime support for protobufs. 2015-05-06 13:19:14 -04:00