Class descriptions are debug-only (#1076)

* android

* description is a debug-only prop
This commit is contained in:
HeyImChris 2022-03-10 08:57:08 -08:00 коммит произвёл GitHub
Родитель fe4f19da6e
Коммит 4ec7149318
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
18 изменённых файлов: 63 добавлений и 31 удалений

Просмотреть файл

@ -24,10 +24,12 @@
[self.superview dirtyLayout]; [self.superview dirtyLayout];
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSString *superDescription = super.description; NSString *superDescription = super.description;
return [[superDescription substringToIndex:superDescription.length - 1] stringByAppendingFormat:@"; text: %@>", self.text]; return [[superDescription substringToIndex:superDescription.length - 1] stringByAppendingFormat:@"; text: %@>", self.text];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -101,6 +101,7 @@
} }
#endif // ]TODO(macOS GH#774) #endif // ]TODO(macOS GH#774)
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSString *superDescription = super.description; NSString *superDescription = super.description;
@ -114,6 +115,7 @@
} }
// TODO(macOS GH#774)] // TODO(macOS GH#774)]
} }
#endif // TODO(macOS GH#774)
- (void)setSelectable:(BOOL)selectable - (void)setSelectable:(BOOL)selectable
{ {

Просмотреть файл

@ -42,6 +42,7 @@
(CGSizeEqualToSize(_size, object.size) || CGSizeEqualToSize(object.size, CGSizeZero)); (CGSizeEqualToSize(_size, object.size) || CGSizeEqualToSize(object.size, CGSizeZero));
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<RCTImageSource: %p URL=%@, size=%@, scale=%0.f>", return [NSString stringWithFormat:@"<RCTImageSource: %p URL=%@, size=%@, scale=%0.f>",
@ -50,6 +51,7 @@
NSStringFromCGSize(_size), NSStringFromCGSize(_size),
_scale]; _scale];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -136,6 +136,7 @@ static NSRegularExpression *RCTJSStackFrameRegex()
return stack; return stack;
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@: %p method name: %@; file name: %@; line: %ld; column: %ld>", return [NSString stringWithFormat:@"<%@: %p method name: %@; file name: %@; line: %ld; column: %ld>",
@ -146,5 +147,6 @@ static NSRegularExpression *RCTJSStackFrameRegex()
(long)self.lineNumber, (long)self.lineNumber,
(long)self.column]; (long)self.column];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -62,6 +62,7 @@ static RCTSource *RCTSourceCreate(NSURL *url, NSData *data, int64_t length) NS_R
@implementation RCTLoadingProgress @implementation RCTLoadingProgress
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSMutableString *desc = [NSMutableString new]; NSMutableString *desc = [NSMutableString new];
@ -77,6 +78,7 @@ static RCTSource *RCTSourceCreate(NSURL *url, NSData *data, int64_t length) NS_R
[desc appendString:@"\u2026"]; [desc appendString:@"\u2026"];
return desc; return desc;
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -74,6 +74,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
return [_key isEqual:input] && (_flags == flags || flags == 0); return [_key isEqual:input] && (_flags == flags || flags == 0);
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@:%p input=\"%@\" flags=%lld hasBlock=%@>", return [NSString stringWithFormat:@"<%@:%p input=\"%@\" flags=%lld hasBlock=%@>",
@ -83,6 +84,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
(long long)_flags, (long long)_flags,
_block ? @"YES" : @"NO"]; _block ? @"YES" : @"NO"];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -570,9 +570,11 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init);
_methodQueue = nil; _methodQueue = nil;
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@: %p; name=\"%@\">", [self class], self, self.name]; return [NSString stringWithFormat:@"<%@: %p; name=\"%@\">", [self class], self, self.name];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -602,6 +602,7 @@ RCT_EXTERN_C_END
return [NSString stringWithFormat:@"-[%@ %s]", _moduleClass, sel_getName(_selector)]; return [NSString stringWithFormat:@"-[%@ %s]", _moduleClass, sel_getName(_selector)];
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@: %p; exports %@ as %s(); type: %s>", return [NSString stringWithFormat:@"<%@: %p; exports %@ as %s(); type: %s>",
@ -611,5 +612,6 @@ RCT_EXTERN_C_END
self.JSMethodName, self.JSMethodName,
RCTFunctionDescriptorFromType(self.functionType)]; RCTFunctionDescriptorFromType(self.functionType)];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -98,10 +98,12 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
return _coalescingKey; return _coalescingKey;
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString return [NSString
stringWithFormat:@"<%@: %p; name = %@; coalescing key = %hu>", [self class], self, _eventName, _coalescingKey]; stringWithFormat:@"<%@: %p; name = %@; coalescing key = %hu>", [self class], self, _eventName, _coalescingKey];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -131,9 +131,11 @@ using namespace facebook::react;
} }
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@: %p; name = %s>", [self class], self, self.JSMethodName]; return [NSString stringWithFormat:@"<%@: %p; name = %s>", [self class], self, self.JSMethodName];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -190,6 +190,7 @@ static NSString *CAMediaTimingFunctionNameFromRCTAnimationType(RCTAnimationType
_animationType == animation.animationType; _animationType == animation.animationType;
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString return [NSString
@ -204,5 +205,6 @@ static NSString *CAMediaTimingFunctionNameFromRCTAnimationType(RCTAnimationType
_initialVelocity, _initialVelocity,
(long)_animationType]; (long)_animationType];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -64,6 +64,7 @@
[_deletingLayoutAnimation isEqual:deletingLayoutAnimation]); [_deletingLayoutAnimation isEqual:deletingLayoutAnimation]);
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return return
@ -75,5 +76,6 @@
[_updatingLayoutAnimation description], [_updatingLayoutAnimation description],
[_deletingLayoutAnimation description]]; [_deletingLayoutAnimation description]];
} }
#endif // TODO(macOS GH#774)
@end @end

Просмотреть файл

@ -393,6 +393,7 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
return self.reactTag; return self.reactTag;
} }
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSString *description = super.description; NSString *description = super.description;
@ -403,6 +404,7 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
NSStringFromCGRect(self.layoutMetrics.frame)]; NSStringFromCGRect(self.layoutMetrics.frame)];
return description; return description;
} }
#endif // TODO(macOS GH#774)
- (void)addRecursiveDescriptionToString:(NSMutableString *)string atLevel:(NSUInteger)level - (void)addRecursiveDescriptionToString:(NSMutableString *)string atLevel:(NSUInteger)level
{ {

Просмотреть файл

@ -711,6 +711,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
} }
#endif // ]TODO(macOS GH#774) #endif // ]TODO(macOS GH#774)
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSString *superDescription = super.description; NSString *superDescription = super.description;
@ -722,6 +723,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
return [superDescription stringByReplacingCharactersInRange:semicolonRange withString:replacement]; return [superDescription stringByReplacingCharactersInRange:semicolonRange withString:replacement];
} // TODO(macOS GH#774) } // TODO(macOS GH#774)
} }
#endif // TODO(macOS GH#774)
#if TARGET_OS_OSX // [TODO(macOS GH#774) #if TARGET_OS_OSX // [TODO(macOS GH#774)
- (void)viewDidMoveToWindow - (void)viewDidMoveToWindow

Просмотреть файл

@ -30,6 +30,7 @@
RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)decoder) RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)decoder)
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame) RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
NSString *superDescription = [super description]; NSString *superDescription = [super description];
@ -44,6 +45,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
NSStringFromUIEdgeInsets([self safeAreaInsetsIfSupportedAndEnabled]), NSStringFromUIEdgeInsets([self safeAreaInsetsIfSupportedAndEnabled]),
NSStringFromUIEdgeInsets(_currentSafeAreaInsets)]; NSStringFromUIEdgeInsets(_currentSafeAreaInsets)];
} }
#endif // TODO(macOS GH#774)
- (BOOL)isSupportedByOS - (BOOL)isSupportedByOS
{ {

Просмотреть файл

@ -542,8 +542,8 @@ SPEC CHECKSUMS:
boost-for-react-native: 8f7c9ecfe357664c072ffbe2432569667cbf1f1b boost-for-react-native: 8f7c9ecfe357664c072ffbe2432569667cbf1f1b
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8 DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8
FBLazyVector: f9a49507e1136243adff1c1a795595a5e847d811 FBLazyVector: 57d79bb5cdab8b29c5aba65b7d9a3703ece092b3
FBReactNativeSpec: 0b76599045f10c00164afbc3b7dadbc0586b06aa FBReactNativeSpec: 7cd8c2bd6ca533fb450c949eb3dd9ddf4c51dd14
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733 Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
@ -558,34 +558,34 @@ SPEC CHECKSUMS:
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
RCT-Folly: 43adc9ce880eb76792f88c011773cb5c664c1419 RCT-Folly: 43adc9ce880eb76792f88c011773cb5c664c1419
RCTRequired: ea4892e8dc691de4cf2129f4d29fe83cb491bdcc RCTRequired: 825f6bb0941a272347e2e9c593ce449321b1f1ba
RCTTypeSafety: 6aee186c117ff01665977d2d70f0a300cdc9b4ad RCTTypeSafety: 1406a9ee2e2c624f855206fe633dbbe2834d54db
React: e7fc9cffd3c5988b438fa5aaba6141aad86971e6 React: cf2fc7e629ffcf94c14507ce3c6c19b6d3b244c8
React-callinvoker: bea112449c41192b309cdb7c712e6ae9a8f4c070 React-callinvoker: 90d1bea10d76161cf1717ba5e13f496d2a75c965
React-Core: 41d3242d227eb7a0481750798f48d52359054450 React-Core: 0b43e1a9c0b56a590080001a413684b6929b9660
React-CoreModules: 29ff97252b5a4ec16c5adbcab8d49a8d5e6ea3bf React-CoreModules: 467dc152ea6d03eea4679de1d7bbdb151e3e2198
React-cxxreact: 9bd13f543f7c2f6fcd9d117a2a3f486e5c2530bb React-cxxreact: 1fc58e96a288b78d107206f9b49db271b7875d22
React-jsi: 05a3c6306ba9b754e879dfaf7110bf559f96cbda React-jsi: a665a471fc558a347f07cc6489c226dbfcead0a0
React-jsiexecutor: 199a16dbf1b183c7f3068b49f848013c1d0c8506 React-jsiexecutor: 61e51ca12cd2734f552869ccfc50981ea9b070aa
React-jsinspector: 911c0c94d9f51d297827722451d5e457fab635da React-jsinspector: 7809ff2106f153c7c3d84fec87f82fe462de4447
React-logger: c57708498fefd433ebfcbabd9a063ed174010d62 React-logger: 722bbc4413f09944fd9b0cd33dcc71f7369f2ba7
React-perflogger: 8aac65f8d87f45d8a7c980e3d3d37b97a9ed650c React-perflogger: f294dca0b8e3921a62401115112053ee60fe23f4
React-RCTActionSheet: 3b36d5f3011473512b04a0f39b144505271ed3ef React-RCTActionSheet: 75293c9485e0b2cfdeed972b95d1d3fd1b99f7fc
React-RCTAnimation: 33df7e35b98b9e83f1574e6b92c217ef54178867 React-RCTAnimation: 1390e55464d2af02863bc4ada0ca8b3fdada75fa
React-RCTBlob: 5ee404a8716f0055ff78999f5d12d060b03a352b React-RCTBlob: 18f754772edeebc6a6d4679851a6139c4ef573df
React-RCTImage: 876e01ce57e5027eee514170b21e95aada21b203 React-RCTImage: 6f12d37c3add53e41b345d5f3d010942e9abe6c4
React-RCTLinking: 8002745c01b7723379a262dfe8575c81100b0d87 React-RCTLinking: 715317472c2253dc3da0fc3ccf5264c8a80f5754
React-RCTNetwork: fdf2f1e67be55ee3792366bc832461fc2044ab52 React-RCTNetwork: 0602c1c7b5c8c7a0031ba3edaa1b43510b8e2462
React-RCTPushNotification: f7fbaf9b10ce0abd3a43ffa3204ea5bb7f9a110a React-RCTPushNotification: ba0c44433faf2f3b47195940d3d457e0db275172
React-RCTSettings: 49a609a6c7d4273a9f6fdf29c1f21d14e3f5c92d React-RCTSettings: 47e69b7b608ebde97871ab3db6ab358d554b3e43
React-RCTTest: d35e7daa9fa7bb6e2febacb85eeee19527711706 React-RCTTest: de2fa2f591d89e42dee84c50365b8daf13deec50
React-RCTText: 14747294de36617bdc7808529b3a223c10ea20ef React-RCTText: 0b377bd4b12ed648eab515607b2d2d74b26c9afe
React-RCTVibration: 5d1a1a5ae3714a3f1eadad43df60c9e6f9e04f85 React-RCTVibration: 1130d42fd483ea7d927bd6af47429ecc3f36e315
React-runtimeexecutor: 83250c622f59b5851d03dfe820936aff9f98368a React-runtimeexecutor: d547e9aa6f215292969adf335c789c2578779565
React-TurboModuleCxx-RNW: f2e32cbfced49190a61d66c993a8975de79a158a React-TurboModuleCxx-RNW: f2e32cbfced49190a61d66c993a8975de79a158a
React-TurboModuleCxx-WinRTPort: 2fce7b4eb8e260b508acee6d26f4f0531709a74e React-TurboModuleCxx-WinRTPort: 714bdaa2b0f98a8ba9b211f0a362fd4a605e8bd9
ReactCommon: 2d0e5b1f1b90ffb71ab452cc904d7865ea5bf504 ReactCommon: 4cb6551813c8a76566444361e539e83b5d21883d
Yoga: 6ca992f0bab255c81622a6e0ab8ad856d6203eba Yoga: 7c2260d154c01042381e4df1da0308f450b60709
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: c7a7110b242497f2bf323ba74caedb9ee61ee05e PODFILE CHECKSUM: c7a7110b242497f2bf323ba74caedb9ee61ee05e

Просмотреть файл

@ -54,10 +54,12 @@ typedef struct RGBAPixel {
#pragma mark - Properties #pragma mark - Properties
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"%@ %@", [super description], _referenceImagesDirectory]; return [NSString stringWithFormat:@"%@ %@", [super description], _referenceImagesDirectory];
} }
#endif // TODO(macOS GH#774)
#pragma mark - Public API #pragma mark - Public API

Просмотреть файл

@ -1869,7 +1869,7 @@
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
@ -1953,7 +1953,7 @@
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;