[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
pull/18098/head
Thomas Van Lenten 5 months ago committed by Copybara-Service
parent 3c3d4900bc
commit 231b968b9c
  1. 2
      objectivec/GPBArray_PackagePrivate.h
  2. 2
      objectivec/GPBCodedInputStream.h
  3. 4
      objectivec/GPBCodedInputStream_PackagePrivate.h
  4. 12
      objectivec/GPBCodedOutputStream.h
  5. 4
      objectivec/GPBCodedOutputStream_PackagePrivate.h
  6. 8
      objectivec/GPBDictionary_PackagePrivate.h
  7. 9
      objectivec/GPBExtensionInternals.h
  8. 3
      objectivec/GPBExtensionRegistry.h
  9. 8
      objectivec/GPBMessage.h
  10. 2
      objectivec/GPBRootObject.h
  11. 2
      objectivec/GPBRootObject_PackagePrivate.h
  12. 1
      objectivec/GPBRuntimeTypes.h
  13. 7
      objectivec/GPBUnknownField.h
  14. 2
      objectivec/GPBUnknownFieldSet.h
  15. 5
      objectivec/GPBUnknownFieldSet_PackagePrivate.h
  16. 2
      objectivec/GPBUnknownField_PackagePrivate.h
  17. 3
      objectivec/GPBUnknownFields.h
  18. 2
      objectivec/GPBUnknownFields_PackagePrivate.h
  19. 3
      objectivec/GPBUtilities.h
  20. 1
      objectivec/GPBUtilities_PackagePrivate.h

@ -7,7 +7,7 @@
#import "GPBArray.h"
@class GPBMessage;
#import "GPBMessage.h"
//%PDDM-DEFINE DECLARE_ARRAY_EXTRAS()
//%ARRAY_INTERFACE_EXTRAS(Int32, int32_t)

@ -9,7 +9,7 @@
#import "GPBExtensionRegistry.h"
@class GPBMessage;
#import "GPBMessage.h"
NS_ASSUME_NONNULL_BEGIN

@ -11,8 +11,10 @@
#import "GPBCodedInputStream.h"
#import "GPBDescriptor.h"
#import "GPBUnknownFieldSet.h"
@class GPBUnknownFieldSet;
@class GPBFieldDescriptor;
typedef struct GPBCodedInputStreamState {
const uint8_t *bytes;

@ -10,15 +10,9 @@
#import "GPBRuntimeTypes.h"
#import "GPBWireFormat.h"
@class GPBBoolArray;
@class GPBDoubleArray;
@class GPBEnumArray;
@class GPBFloatArray;
@class GPBMessage;
@class GPBInt32Array;
@class GPBInt64Array;
@class GPBUInt32Array;
@class GPBUInt64Array;
#import "GPBArray.h"
#import "GPBUnknownFieldSet.h"
@class GPBUnknownFieldSet;
NS_ASSUME_NONNULL_BEGIN

@ -5,8 +5,12 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import <Foundation/Foundation.h>
#import "GPBCodedOutputStream.h"
#import "GPBMessage.h"
NS_ASSUME_NONNULL_BEGIN
CF_EXTERN_C_BEGIN

@ -9,10 +9,10 @@
#import "GPBDictionary.h"
@class GPBCodedInputStream;
@class GPBCodedOutputStream;
@protocol GPBExtensionRegistry;
@class GPBFieldDescriptor;
#import "GPBCodedInputStream.h"
#import "GPBCodedOutputStream.h"
#import "GPBDescriptor.h"
#import "GPBExtensionRegistry.h"
@protocol GPBDictionaryInternalsProtocol
- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;

@ -7,11 +7,12 @@
#import <Foundation/Foundation.h>
#import "GPBCodedOutputStream.h"
#import "GPBDescriptor.h"
@class GPBCodedOutputStream;
size_t GPBComputeExtensionSerializedSizeIncludingTag(
GPBExtensionDescriptor *extension, id value);
size_t GPBComputeExtensionSerializedSizeIncludingTag(GPBExtensionDescriptor *extension, id value);
void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension, id value,
void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension,
id value,
GPBCodedOutputStream *output);

@ -7,8 +7,7 @@
#import <Foundation/Foundation.h>
@class GPBDescriptor;
@class GPBExtensionDescriptor;
#import "GPBDescriptor.h"
NS_ASSUME_NONNULL_BEGIN

@ -8,13 +8,15 @@
#import <Foundation/Foundation.h>
#import "GPBBootstrap.h"
#import "GPBCodedInputStream.h"
#import "GPBCodedOutputStream.h"
#import "GPBDescriptor.h"
#import "GPBExtensionRegistry.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFields.h"
@class GPBDescriptor;
@class GPBCodedInputStream;
@class GPBCodedOutputStream;
@class GPBExtensionDescriptor;
@class GPBFieldDescriptor;
@class GPBUnknownFieldSet;
@class GPBUnknownFields;

@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
@class GPBExtensionRegistry;
#import "GPBExtensionRegistry.h"
NS_ASSUME_NONNULL_BEGIN

@ -9,7 +9,7 @@
#import "GPBRootObject.h"
@class GPBExtensionDescriptor;
#import "GPBDescriptor.h"
@interface GPBRootObject ()

@ -11,7 +11,6 @@
@class GPBEnumDescriptor;
@class GPBMessage;
@class GPBInt32Array;
/**
* Verifies that a given value can be represented by an enum type.

@ -7,9 +7,10 @@
#import <Foundation/Foundation.h>
@class GPBCodedOutputStream;
@class GPBUInt32Array;
@class GPBUInt64Array;
#import "GPBArray.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFields.h"
@class GPBUnknownFieldSet;
@class GPBUnknownFields;

@ -7,6 +7,8 @@
#import <Foundation/Foundation.h>
#import "GPBUnknownField.h"
@class GPBUnknownField;
NS_ASSUME_NONNULL_BEGIN

@ -7,11 +7,10 @@
#import <Foundation/Foundation.h>
#import "GPBCodedInputStream.h"
#import "GPBCodedOutputStream.h"
#import "GPBUnknownFieldSet.h"
@class GPBCodedOutputStream;
@class GPBCodedInputStream;
@interface GPBUnknownFieldSet ()
- (NSData *)data;

@ -9,6 +9,8 @@
#import "GPBUnknownField.h"
#import "GPBArray.h"
@class GPBCodedOutputStream;
@interface GPBUnknownField () {

@ -7,6 +7,9 @@
#import <Foundation/Foundation.h>
#import "GPBMessage.h"
#import "GPBUnknownField.h"
@class GPBMessage;
@class GPBUnknownField;

@ -9,8 +9,6 @@
#import "GPBUnknownFields.h"
@class GPBCodedOutputStream;
@interface GPBUnknownFields ()
- (nonnull NSData *)serializeAsData;

@ -8,11 +8,10 @@
#import <Foundation/Foundation.h>
#import "GPBArray.h"
#import "GPBDescriptor.h"
#import "GPBMessage.h"
#import "GPBRuntimeTypes.h"
@class GPBOneofDescriptor;
CF_EXTERN_C_BEGIN
NS_ASSUME_NONNULL_BEGIN

@ -9,6 +9,7 @@
#import "GPBUtilities.h"
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
// Macros for stringifying library symbols. These are used in the generated

Loading…
Cancel
Save