[ObjC] Use more complete imports

Import both the public and private header into impls when the
private is needed.

Also update the tests to use more complete imports.

PiperOrigin-RevId: 671388271
pull/18100/head
Thomas Van Lenten 6 months ago committed by Copybara-Service
parent 231b968b9c
commit 5710bfcbb9
  1. 2
      objectivec/GPBArray.m
  2. 5
      objectivec/GPBCodedInputStream.m
  3. 3
      objectivec/GPBCodedOutputStream.m
  4. 3
      objectivec/GPBDescriptor.m
  5. 6
      objectivec/GPBDictionary.m
  6. 5
      objectivec/GPBExtensionInternals.m
  7. 10
      objectivec/GPBMessage.m
  8. 5
      objectivec/GPBRootObject.m
  9. 4
      objectivec/GPBUnknownField.m
  10. 3
      objectivec/GPBUnknownFieldSet.m
  11. 4
      objectivec/GPBUnknownFields.m
  12. 5
      objectivec/GPBUtilities.m
  13. 1
      objectivec/GPBWellKnownTypes.m
  14. 1
      objectivec/GPBWireFormat.m
  15. 1
      objectivec/Tests/GPBArrayTests.m
  16. 1
      objectivec/Tests/GPBCodedInputStreamTests.m
  17. 5
      objectivec/Tests/GPBCodedOutputStreamTests.m
  18. 4
      objectivec/Tests/GPBDescriptorTests.m
  19. 1
      objectivec/Tests/GPBDictionaryTests+Bool.m
  20. 1
      objectivec/Tests/GPBDictionaryTests+Int32.m
  21. 1
      objectivec/Tests/GPBDictionaryTests+Int64.m
  22. 1
      objectivec/Tests/GPBDictionaryTests+String.m
  23. 1
      objectivec/Tests/GPBDictionaryTests+UInt32.m
  24. 1
      objectivec/Tests/GPBDictionaryTests+UInt64.m
  25. 1
      objectivec/Tests/GPBDictionaryTests.m
  26. 3
      objectivec/Tests/GPBExtensionRegistryTest.m
  27. 3
      objectivec/Tests/GPBMessageTests+ClassNames.m
  28. 4
      objectivec/Tests/GPBMessageTests+Merge.m
  29. 4
      objectivec/Tests/GPBMessageTests+Runtime.m
  30. 4
      objectivec/Tests/GPBMessageTests+Serialization.m
  31. 3
      objectivec/Tests/GPBMessageTests.m
  32. 11
      objectivec/Tests/GPBTestUtilities.h
  33. 1
      objectivec/Tests/GPBTestUtilities.m
  34. 1
      objectivec/Tests/GPBUnknownFieldSetTest.m
  35. 1
      objectivec/Tests/GPBUtilitiesTests.m
  36. 3
      objectivec/Tests/GPBWellKnownTypesTest.m

@ -5,8 +5,10 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBArray.h"
#import "GPBArray_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
// Direct access is use for speed, to avoid even internally declaring things

@ -5,11 +5,16 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
#import "GPBWireFormat.h"

@ -5,12 +5,15 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import <mach/vm_param.h>
#import "GPBArray.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
// TODO: Consider using on other functions to reduce bloat when

@ -5,11 +5,14 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import <objc/runtime.h>
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
#import "GPBWireFormat.h"

@ -5,12 +5,18 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
// ------------------------------ NOTE ------------------------------

@ -9,10 +9,15 @@
#import <objc/runtime.h>
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
GPB_INLINE size_t DataTypeSize(GPBDataType dataType) {

@ -6,6 +6,7 @@
// https://developers.google.com/open-source/licenses/bsd
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import <Foundation/Foundation.h>
#import <objc/message.h>
@ -13,19 +14,26 @@
#import <os/lock.h>
#import <stdatomic.h>
#import "GPBArray.h"
#import "GPBArray_PackagePrivate.h"
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBExtensionInternals.h"
#import "GPBExtensionRegistry.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBRootObject.h"
#import "GPBRootObject_PackagePrivate.h"
#import "GPBUnknownField.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUnknownFields.h"
#import "GPBUnknownFields_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
// TODO: Consider using on other functions to reduce bloat when

@ -5,15 +5,16 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBRootObject.h"
#import "GPBRootObject_PackagePrivate.h"
#import <CoreFoundation/CoreFoundation.h>
#import <objc/runtime.h>
#import <os/lock.h>
#import <CoreFoundation/CoreFoundation.h>
#import "GPBDescriptor.h"
#import "GPBExtensionRegistry.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
@interface GPBExtensionDescriptor (GPBRootObject)

@ -6,11 +6,13 @@
// https://developers.google.com/open-source/licenses/bsd
#import "GPBUnknownField.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBArray.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUnknownFields.h"
#import "GPBUnknownFields_PackagePrivate.h"
#import "GPBWireFormat.h"

@ -5,10 +5,13 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBCodedOutputStream.h"
#import "GPBUnknownField.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBWireFormat.h"

@ -6,9 +6,11 @@
// https://developers.google.com/open-source/licenses/bsd
#import "GPBUnknownFields.h"
#import "GPBUnknownFields_PackagePrivate.h"
#import <Foundation/Foundation.h>
#import "GPBCodedInputStream.h"
#import "GPBCodedInputStream_PackagePrivate.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
@ -16,9 +18,9 @@
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUnknownField.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUnknownFields_PackagePrivate.h"
#import "GPBWireFormat.h"
#define CHECK_FIELD_NUMBER(number) \

@ -9,14 +9,19 @@
#import <objc/runtime.h>
#import "GPBArray.h"
#import "GPBArray_PackagePrivate.h"
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBUnknownField.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUnknownFields.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
// Direct access is use for speed, to avoid even internally declaring things

@ -11,6 +11,7 @@
#import "GPBWellKnownTypes.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
NSString *const GPBWellKnownTypesErrorDomain = GPBNSStringifySymbol(GPBWellKnownTypesErrorDomain);

@ -7,6 +7,7 @@
#import "GPBWireFormat.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
enum {

@ -10,7 +10,6 @@
#import "GPBArray.h"
#import "GPBArray_PackagePrivate.h"
#import "GPBTestUtilities.h"
// To let the testing macros work, add some extra methods to simplify things.

@ -14,6 +14,7 @@
#import "GPBUnknownField.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUnknownFields.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
#import "GPBWireFormat.h"
#import "objectivec/Tests/Unittest.pbobjc.h"

@ -5,10 +5,11 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import "GPBCodedInputStream.h"
#import "GPBCodedOutputStream.h"
#import "GPBCodedOutputStream_PackagePrivate.h"
#import "GPBTestUtilities.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
#import "objectivec/Tests/Unittest.pbobjc.h"

@ -5,11 +5,11 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import <objc/runtime.h>
#import "GPBDescriptor.h"
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
#import "objectivec/Tests/UnittestObjc.pbobjc.h"
#import "objectivec/Tests/UnittestObjcOptions.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -9,7 +9,6 @@
#import <XCTest/XCTest.h>
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"

@ -10,7 +10,6 @@
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBTestUtilities.h"
#pragma mark - GPBAutocreatedDictionary Tests

@ -5,9 +5,8 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import "GPBExtensionRegistry.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
@interface GPBExtensionRegistryTest : GPBTestCase

@ -5,14 +5,13 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import <objc/runtime.h>
#import "GPBDescriptor_PackagePrivate.h"
#import "GPBExtensionRegistry.h"
#import "GPBMessage.h"
#import "GPBRootObject_PackagePrivate.h"
#import "GPBTestUtilities.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

@ -5,12 +5,10 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import <objc/runtime.h>
#import "GPBMessage.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
#import "objectivec/Tests/UnittestPreserveUnknownEnum.pbobjc.h"

@ -5,12 +5,10 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import <objc/runtime.h>
#import "GPBMessage.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
#import "objectivec/Tests/UnittestCycle.pbobjc.h"

@ -5,12 +5,10 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import <objc/runtime.h>
#import "GPBMessage.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/MapProto2Unittest.pbobjc.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"

@ -10,10 +10,13 @@
#import "GPBArray.h"
#import "GPBArray_PackagePrivate.h"
#import "GPBDescriptor.h"
#import "GPBDictionary.h"
#import "GPBDictionary_PackagePrivate.h"
#import "GPBMessage.h"
#import "GPBMessage_PackagePrivate.h"
#import "GPBTestUtilities.h"
#import "GPBUnknownField.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUnknownFields.h"

@ -7,14 +7,9 @@
#import <XCTest/XCTest.h>
@class TestAllExtensions;
@class TestAllTypes;
@class TestMap;
@class TestPackedTypes;
@class TestPackedExtensions;
@class TestUnpackedTypes;
@class TestUnpackedExtensions;
@class GPBExtensionRegistry;
#import "GPBExtensionRegistry.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
static inline NSData *DataFromCStr(const char *str) {
return [NSData dataWithBytes:str length:strlen(str)];

@ -6,7 +6,6 @@
// https://developers.google.com/open-source/licenses/bsd
#import "GPBTestUtilities.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
#import "objectivec/Tests/UnittestImport.pbobjc.h"

@ -7,7 +7,6 @@
#import "GPBTestUtilities.h"
#import "GPBUnknownFieldSet.h"
#import "GPBUnknownFieldSet_PackagePrivate.h"
#import "GPBUnknownField_PackagePrivate.h"
#import "objectivec/Tests/Unittest.pbobjc.h"

@ -16,7 +16,6 @@
#import "GPBUnknownField_PackagePrivate.h"
#import "GPBUtilities.h"
#import "GPBUtilities_PackagePrivate.h"
#import "objectivec/Tests/MapUnittest.pbobjc.h"
#import "objectivec/Tests/Unittest.pbobjc.h"
#import "objectivec/Tests/UnittestObjc.pbobjc.h"

@ -5,11 +5,10 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#import "GPBWellKnownTypes.h"
#import <XCTest/XCTest.h>
#import "GPBTestUtilities.h"
#import "GPBWellKnownTypes.h"
#import "objectivec/Tests/AnyTest.pbobjc.h"
// Nanosecond time accuracy

Loading…
Cancel
Save