mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Minor: Rename RCTNotAllowedInAppWideFabric to RCTNotAllowedInFabricWithoutLegacy
Summary: Changelog: [Internal][iOS] Minor: Rename RCTNotAllowedInAppWideFabric to RCTNotAllowedInFabricWithoutLegacy `RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInBridgeless` is to track Bridge APIs that are okay in Fabric but not in Bridgeless. `RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInFabricWithoutLegacy` is to track legacy APIs that should not exist if the app was using Fabric **without any legacy architecture**. e.g. RCTBridgeModule, legacy interop view components. Reviewed By: fkgozali Differential Revision: D37659105 fbshipit-source-id: aee4e083820e83a8dac19eb3b5efc49b37d90039
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8bb0a9f9c9
commit
674609757b
@@ -179,15 +179,17 @@ RCT_EXTERN NSString *RCTFormatStackTrace(NSArray<NSDictionary<NSString *, id> *>
|
||||
|
||||
typedef enum {
|
||||
RCTNotAllowedInBridgeless = 1,
|
||||
RCTNotAllowedInAppWideFabric = 2,
|
||||
RCTNotAllowedInFabricWithoutLegacy = 2,
|
||||
RCTNotAllowedValidationDisabled = 3,
|
||||
} RCTNotAllowedValidation;
|
||||
|
||||
/**
|
||||
* // TODO: (T125626909) Only validate legacy architecture usages in Bridgeless mode, not Bridged Fabric mode
|
||||
*
|
||||
* Ensure runtime assumptions holds for the new architecture by reporting when assumptions are violated.
|
||||
* Note: this is work in progress.
|
||||
*
|
||||
* When level is RCTNotAllowedInAppWideFabric, validate Fabric assumptions.
|
||||
* When level is RCTNotAllowedInFabricWithoutLegacy, validate Fabric assumptions.
|
||||
* i.e. Report legacy pre-Fabric call sites that should not be used while Fabric is enabled on all surfaces.
|
||||
*
|
||||
* When level is RCTNotAllowedInBridgeless, validate Fabric or Bridgeless assumptions.
|
||||
|
||||
@@ -276,7 +276,7 @@ static NSString *validationMessage(RCTNotAllowedValidation type, id context, NSS
|
||||
case RCTNotAllowedValidationDisabled:
|
||||
RCTAssert(0, @"RCTNotAllowedValidationDisabled not a validation type.");
|
||||
return nil;
|
||||
case RCTNotAllowedInAppWideFabric:
|
||||
case RCTNotAllowedInFabricWithoutLegacy:
|
||||
notAllowedType = @"Fabric";
|
||||
break;
|
||||
case RCTNotAllowedInBridgeless:
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
moduleName:(NSString *)moduleName
|
||||
initialProperties:(NSDictionary *)initialProperties
|
||||
{
|
||||
RCTErrorNewArchitectureValidation(RCTNotAllowedInAppWideFabric, @"RCTSurface", nil);
|
||||
RCTErrorNewArchitectureValidation(RCTNotAllowedInFabricWithoutLegacy, @"RCTSurface", nil);
|
||||
RCTAssert(bridge.valid, @"Valid bridge is required to instantiate `RCTSurface`.");
|
||||
|
||||
if (self = [super init]) {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
- (instancetype)initWithWindow:(UIWindow *)window bridge:(RCTBridge *)bridge
|
||||
{
|
||||
RCTErrorNewArchitectureValidation(RCTNotAllowedInAppWideFabric, @"RCTLogBoxView", nil);
|
||||
RCTErrorNewArchitectureValidation(RCTNotAllowedInFabricWithoutLegacy, @"RCTLogBoxView", nil);
|
||||
|
||||
if (@available(iOS 13.0, *)) {
|
||||
self = [super initWithWindowScene:window.windowScene];
|
||||
|
||||
@@ -1657,7 +1657,7 @@ static UIView *_jsResponder;
|
||||
+ (UIView *)JSResponder
|
||||
{
|
||||
RCTErrorNewArchitectureValidation(
|
||||
RCTNotAllowedInAppWideFabric, @"RCTUIManager", @"Please migrate this legacy surface to Fabric.");
|
||||
RCTNotAllowedInFabricWithoutLegacy, @"RCTUIManager", @"Please migrate this legacy surface to Fabric.");
|
||||
return _jsResponder;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ RCT_EXPORT_MODULE()
|
||||
- (UIView *)view
|
||||
{
|
||||
RCTNewArchitectureValidationPlaceholder(
|
||||
RCTNotAllowedInAppWideFabric,
|
||||
RCTNotAllowedInFabricWithoutLegacy,
|
||||
self,
|
||||
@"This native component is still using the legacy interop layer -- please migrate it to use a Fabric specific implementation.");
|
||||
return [RCTDatePicker new];
|
||||
|
||||
@@ -17,7 +17,7 @@ RCT_EXPORT_MODULE()
|
||||
- (UIView *)view
|
||||
{
|
||||
RCTNewArchitectureValidationPlaceholder(
|
||||
RCTNotAllowedInAppWideFabric,
|
||||
RCTNotAllowedInFabricWithoutLegacy,
|
||||
self,
|
||||
@"This native component is still using the legacy interop layer -- please migrate it to use a Fabric specific implementation.");
|
||||
return [RCTMaskedView new];
|
||||
|
||||
@@ -29,7 +29,7 @@ RCT_EXPORT_MODULE()
|
||||
- (UIView *)view
|
||||
{
|
||||
RCTNewArchitectureValidationPlaceholder(
|
||||
RCTNotAllowedInAppWideFabric,
|
||||
RCTNotAllowedInFabricWithoutLegacy,
|
||||
self,
|
||||
@"This native component is still using the legacy interop layer -- please migrate it to use a Fabric specific implementation.");
|
||||
return [UIProgressView new];
|
||||
|
||||
@@ -18,7 +18,7 @@ RCT_EXPORT_MODULE()
|
||||
- (UIView *)view
|
||||
{
|
||||
RCTNewArchitectureValidationPlaceholder(
|
||||
RCTNotAllowedInAppWideFabric,
|
||||
RCTNotAllowedInFabricWithoutLegacy,
|
||||
self,
|
||||
@"This native component is still using the legacy interop layer -- please migrate it to use a Fabric specific implementation.");
|
||||
return [RCTSegmentedControl new];
|
||||
|
||||
Reference in New Issue
Block a user