[ObjC] Mark some of the old apis as deprecated

The old generated code suppressed warnings broadly to support protobuf
deprecations like this showing to users, but the previous commit does
provide a debug log statement for the usages.

PiperOrigin-RevId: 670581568
pull/18047/head
Thomas Van Lenten 7 months ago committed by Copybara-Service
parent b7a7e71d6e
commit c935f725de
  1. 8
      objectivec/GPBDescriptor_PackagePrivate.h
  2. 8
      objectivec/GPBUtilities_PackagePrivate.h

@ -227,8 +227,12 @@ typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) {
flags:(GPBDescriptorInitializationFlags)flags flags:(GPBDescriptorInitializationFlags)flags
__attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. " __attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. "
"Support for this version will go away in the future."))); "Support for this version will go away in the future.")));
- (void)setupContainingMessageClassName:(const char *)msgClassName; - (void)setupContainingMessageClassName:(const char *)msgClassName
- (void)setupMessageClassNameSuffix:(NSString *)suffix; __attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. "
"Support for this version will go away in the future.")));
- (void)setupMessageClassNameSuffix:(NSString *)suffix
__attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. "
"Support for this version will go away in the future.")));
@end @end

@ -51,8 +51,12 @@ void GPBRuntimeMatchFailure(void);
// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION // Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION
// goes away (see more info in GPBBootstrap.h). // goes away (see more info in GPBBootstrap.h).
void GPBCheckRuntimeVersionInternal(int32_t version); void GPBCheckRuntimeVersionInternal(int32_t version)
GPB_INLINE void GPBDebugCheckRuntimeVersion(void) { __attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. "
"Support for this version will go away in the future.")));
__attribute__((deprecated("Please use a newer version of protoc to regenerate your sources. "
"Support for this version will go away in the future."))) GPB_INLINE void
GPBDebugCheckRuntimeVersion(void) {
#if defined(DEBUG) && DEBUG #if defined(DEBUG) && DEBUG
GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION); GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION);
#endif #endif

Loading…
Cancel
Save