Skip to content

Commit 04d482a

Browse files
committed
DevTools: Inline references to fiber flags (#26542)
We shouldn't be referencing internal fields like fiber's `flag` directly of DevTools. It's an implementation detail. However, over the years a few of these have snuck in. Because of how DevTools is currently shipped, where it's expected to be backwards compatible with older versions of React, this prevents us from refactoring those fields inside the reconciler. The plan we have to address this is to fix how DevTools is shipped: DevTools will be released in lockstep with each version of React. Until then, though, I need a temporary solution because it's blocking a feature I'm working on. So in meantime, I'm going to have to fork the DevTool's code based on the React version, like we already do with the fiber TypeOfWork enum. As a first step, I've inlined all the references to fiber flags into the specific call sites where they are used. Eventually we'll import these functions from the reconciler so they stay in sync, rather than maintaining duplicate copies of the logic. DiffTrain build for commit 0ba4d7b.
1 parent ea9bc44 commit 04d482a

File tree

13 files changed

+19
-19
lines changed

13 files changed

+19
-19
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23884,7 +23884,7 @@ function createFiberRoot(
2388423884
return root;
2388523885
}
2388623886

23887-
var ReactVersion = "18.3.0-next-da94e8b24-20230404";
23887+
var ReactVersion = "18.3.0-next-0ba4d7b0d-20230404";
2388823888

2388923889
// Might add PROFILE later.
2389023890

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8683,7 +8683,7 @@ var devToolsConfig$jscomp$inline_1028 = {
86838683
throw Error("TestRenderer does not support findFiberByHostInstance()");
86848684
},
86858685
bundleType: 0,
8686-
version: "18.3.0-next-da94e8b24-20230404",
8686+
version: "18.3.0-next-0ba4d7b0d-20230404",
86878687
rendererPackageName: "react-test-renderer"
86888688
};
86898689
var internals$jscomp$inline_1220 = {
@@ -8714,7 +8714,7 @@ var internals$jscomp$inline_1220 = {
87148714
scheduleRoot: null,
87158715
setRefreshHandler: null,
87168716
getCurrentFiber: null,
8717-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
8717+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
87188718
};
87198719
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
87208720
var hook$jscomp$inline_1221 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9108,7 +9108,7 @@ var devToolsConfig$jscomp$inline_1070 = {
91089108
throw Error("TestRenderer does not support findFiberByHostInstance()");
91099109
},
91109110
bundleType: 0,
9111-
version: "18.3.0-next-da94e8b24-20230404",
9111+
version: "18.3.0-next-0ba4d7b0d-20230404",
91129112
rendererPackageName: "react-test-renderer"
91139113
};
91149114
var internals$jscomp$inline_1261 = {
@@ -9139,7 +9139,7 @@ var internals$jscomp$inline_1261 = {
91399139
scheduleRoot: null,
91409140
setRefreshHandler: null,
91419141
getCurrentFiber: null,
9142-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
9142+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
91439143
};
91449144
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91459145
var hook$jscomp$inline_1262 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-next-da94e8b24-20230404";
30+
var ReactVersion = "18.3.0-next-0ba4d7b0d-20230404";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
639639
);
640640
};
641641
exports.useTransition = useTransition;
642-
exports.version = "18.3.0-next-da94e8b24-20230404";
642+
exports.version = "18.3.0-next-0ba4d7b0d-20230404";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
642642
);
643643
};
644644
exports.useTransition = useTransition;
645-
exports.version = "18.3.0-next-da94e8b24-20230404";
645+
exports.version = "18.3.0-next-0ba4d7b0d-20230404";
646646

647647
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
648648
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
da94e8b24a3f31a3e805f9bf6bba73055aad9d41
1+
0ba4d7b0d80d942dc8f074f7ce0536e6b2559fbf

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27177,7 +27177,7 @@ function createFiberRoot(
2717727177
return root;
2717827178
}
2717927179

27180-
var ReactVersion = "18.3.0-next-da94e8b24-20230404";
27180+
var ReactVersion = "18.3.0-next-0ba4d7b0d-20230404";
2718127181

2718227182
function createPortal$1(
2718327183
children,

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9554,7 +9554,7 @@ var roots = new Map(),
95549554
devToolsConfig$jscomp$inline_1052 = {
95559555
findFiberByHostInstance: getInstanceFromNode,
95569556
bundleType: 0,
9557-
version: "18.3.0-next-da94e8b24-20230404",
9557+
version: "18.3.0-next-0ba4d7b0d-20230404",
95589558
rendererPackageName: "react-native-renderer",
95599559
rendererConfig: {
95609560
getInspectorDataForViewTag: function () {
@@ -9596,7 +9596,7 @@ var internals$jscomp$inline_1297 = {
95969596
scheduleRoot: null,
95979597
setRefreshHandler: null,
95989598
getCurrentFiber: null,
9599-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
9599+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
96009600
};
96019601
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96029602
var hook$jscomp$inline_1298 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10262,7 +10262,7 @@ var roots = new Map(),
1026210262
devToolsConfig$jscomp$inline_1130 = {
1026310263
findFiberByHostInstance: getInstanceFromNode,
1026410264
bundleType: 0,
10265-
version: "18.3.0-next-da94e8b24-20230404",
10265+
version: "18.3.0-next-0ba4d7b0d-20230404",
1026610266
rendererPackageName: "react-native-renderer",
1026710267
rendererConfig: {
1026810268
getInspectorDataForViewTag: function () {
@@ -10317,7 +10317,7 @@ var roots = new Map(),
1031710317
scheduleRoot: null,
1031810318
setRefreshHandler: null,
1031910319
getCurrentFiber: null,
10320-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
10320+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
1032110321
});
1032210322
exports.createPortal = function (children, containerTag) {
1032310323
return createPortal$1(

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27700,7 +27700,7 @@ function createFiberRoot(
2770027700
return root;
2770127701
}
2770227702

27703-
var ReactVersion = "18.3.0-next-da94e8b24-20230404";
27703+
var ReactVersion = "18.3.0-next-0ba4d7b0d-20230404";
2770427704

2770527705
function createPortal$1(
2770627706
children,

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9810,7 +9810,7 @@ var roots = new Map(),
98109810
devToolsConfig$jscomp$inline_1107 = {
98119811
findFiberByHostInstance: getInstanceFromTag,
98129812
bundleType: 0,
9813-
version: "18.3.0-next-da94e8b24-20230404",
9813+
version: "18.3.0-next-0ba4d7b0d-20230404",
98149814
rendererPackageName: "react-native-renderer",
98159815
rendererConfig: {
98169816
getInspectorDataForViewTag: function () {
@@ -9852,7 +9852,7 @@ var internals$jscomp$inline_1359 = {
98529852
scheduleRoot: null,
98539853
setRefreshHandler: null,
98549854
getCurrentFiber: null,
9855-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
9855+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
98569856
};
98579857
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
98589858
var hook$jscomp$inline_1360 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10518,7 +10518,7 @@ var roots = new Map(),
1051810518
devToolsConfig$jscomp$inline_1185 = {
1051910519
findFiberByHostInstance: getInstanceFromTag,
1052010520
bundleType: 0,
10521-
version: "18.3.0-next-da94e8b24-20230404",
10521+
version: "18.3.0-next-0ba4d7b0d-20230404",
1052210522
rendererPackageName: "react-native-renderer",
1052310523
rendererConfig: {
1052410524
getInspectorDataForViewTag: function () {
@@ -10573,7 +10573,7 @@ var roots = new Map(),
1057310573
scheduleRoot: null,
1057410574
setRefreshHandler: null,
1057510575
getCurrentFiber: null,
10576-
reconcilerVersion: "18.3.0-next-da94e8b24-20230404"
10576+
reconcilerVersion: "18.3.0-next-0ba4d7b0d-20230404"
1057710577
});
1057810578
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
1057910579
computeComponentStackForErrorReporting: function (reactTag) {

0 commit comments

Comments
 (0)