Skip to content

Commit

Permalink
Log Fragment name when trying to render a lazy fragment (#30372)
Browse files Browse the repository at this point in the history
DiffTrain build for [9cc0f6e](9cc0f6e)
  • Loading branch information
eps1lon committed Jul 23, 2024
1 parent a9dbaee commit 288b7b7
Show file tree
Hide file tree
Showing 34 changed files with 1,212 additions and 1,013 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b7e7f1a3fab87e8fc19e86a8088a9e0fe4710973
9cc0f6e68de2b83b11d1fb2b514d2f508c2da6f7
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b7e7f1a3fab87e8fc19e86a8088a9e0fe4710973
9cc0f6e68de2b83b11d1fb2b514d2f508c2da6f7
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-b7e7f1a3-20240722";
exports.version = "19.0.0-www-classic-9cc0f6e6-20240723";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-b7e7f1a3-20240722";
exports.version = "19.0.0-www-modern-9cc0f6e6-20240723";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,4 +662,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-b7e7f1a3-20240722";
exports.version = "19.0.0-www-classic-9cc0f6e6-20240723";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,4 +662,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-b7e7f1a3-20240722";
exports.version = "19.0.0-www-modern-9cc0f6e6-20240723";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-b7e7f1a3-20240722";
exports.version = "19.0.0-www-classic-9cc0f6e6-20240723";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-b7e7f1a3-20240722";
exports.version = "19.0.0-www-modern-9cc0f6e6-20240723";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
7 changes: 4 additions & 3 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8139,9 +8139,10 @@ __DEV__ &&
current.$$typeof === REACT_LAZY_TYPE &&
(workInProgress =
" Did you wrap a component in React.lazy() more than once?");
renderLanes = getComponentNameFromType(current) || current;
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
current +
renderLanes +
". Lazy element type must resolve to a class or function." +
workInProgress
);
Expand Down Expand Up @@ -17034,14 +17035,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-b7e7f1a3-20240722"
reconcilerVersion: "19.0.0-www-classic-9cc0f6e6-20240723"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-b7e7f1a3-20240722",
version: "19.0.0-www-classic-9cc0f6e6-20240723",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
7 changes: 4 additions & 3 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -7849,9 +7849,10 @@ __DEV__ &&
current.$$typeof === REACT_LAZY_TYPE &&
(workInProgress =
" Did you wrap a component in React.lazy() more than once?");
renderLanes = getComponentNameFromType(current) || current;
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
current +
renderLanes +
". Lazy element type must resolve to a class or function." +
workInProgress
);
Expand Down Expand Up @@ -16444,14 +16445,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-b7e7f1a3-20240722"
reconcilerVersion: "19.0.0-www-modern-9cc0f6e6-20240723"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-b7e7f1a3-20240722",
version: "19.0.0-www-modern-9cc0f6e6-20240723",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
33 changes: 17 additions & 16 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5763,7 +5763,8 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
throw Error(formatProdErrorMessage(306, current, ""));
workInProgress = getComponentNameFromType(current) || current;
throw Error(formatProdErrorMessage(306, workInProgress, ""));
}
}
return workInProgress;
Expand Down Expand Up @@ -10757,19 +10758,19 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component),
devToolsConfig$jscomp$inline_1174 = {
devToolsConfig$jscomp$inline_1175 = {
findFiberByHostInstance: function () {
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-b7e7f1a3-20240722",
version: "19.0.0-www-classic-9cc0f6e6-20240723",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1386 = {
bundleType: devToolsConfig$jscomp$inline_1174.bundleType,
version: devToolsConfig$jscomp$inline_1174.version,
rendererPackageName: devToolsConfig$jscomp$inline_1174.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1174.rendererConfig,
var internals$jscomp$inline_1387 = {
bundleType: devToolsConfig$jscomp$inline_1175.bundleType,
version: devToolsConfig$jscomp$inline_1175.version,
rendererPackageName: devToolsConfig$jscomp$inline_1175.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1175.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
Expand All @@ -10786,26 +10787,26 @@ var internals$jscomp$inline_1386 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1174.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1175.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-b7e7f1a3-20240722"
reconcilerVersion: "19.0.0-www-classic-9cc0f6e6-20240723"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1387 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1388 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1387.isDisabled &&
hook$jscomp$inline_1387.supportsFiber
!hook$jscomp$inline_1388.isDisabled &&
hook$jscomp$inline_1388.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1387.inject(
internals$jscomp$inline_1386
(rendererID = hook$jscomp$inline_1388.inject(
internals$jscomp$inline_1387
)),
(injectedHook = hook$jscomp$inline_1387);
(injectedHook = hook$jscomp$inline_1388);
} catch (err) {}
}
var Path = Mode$1.Path;
Expand Down
94 changes: 77 additions & 17 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,66 @@ function getIteratorFn(maybeIterable) {
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
Symbol.for("react.client.reference");
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_TRACING_MARKER_TYPE:
if (enableTransitionTracing) return "TracingMarker";
}
if ("object" === typeof type)
switch (type.$$typeof) {
case REACT_PROVIDER_TYPE:
if (enableRenderableContext) break;
else return (type._context.displayName || "Context") + ".Provider";
case REACT_CONTEXT_TYPE:
return enableRenderableContext
? (type.displayName || "Context") + ".Provider"
: (type.displayName || "Context") + ".Consumer";
case REACT_CONSUMER_TYPE:
if (enableRenderableContext)
return (type._context.displayName || "Context") + ".Consumer";
break;
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
var ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
prefix,
Expand Down Expand Up @@ -5397,7 +5456,8 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
throw Error(formatProdErrorMessage(306, current, ""));
workInProgress = getComponentNameFromType(current) || current;
throw Error(formatProdErrorMessage(306, workInProgress, ""));
}
}
return workInProgress;
Expand Down Expand Up @@ -10201,19 +10261,19 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component),
devToolsConfig$jscomp$inline_1138 = {
devToolsConfig$jscomp$inline_1139 = {
findFiberByHostInstance: function () {
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-b7e7f1a3-20240722",
version: "19.0.0-www-modern-9cc0f6e6-20240723",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1372 = {
bundleType: devToolsConfig$jscomp$inline_1138.bundleType,
version: devToolsConfig$jscomp$inline_1138.version,
rendererPackageName: devToolsConfig$jscomp$inline_1138.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1138.rendererConfig,
var internals$jscomp$inline_1373 = {
bundleType: devToolsConfig$jscomp$inline_1139.bundleType,
version: devToolsConfig$jscomp$inline_1139.version,
rendererPackageName: devToolsConfig$jscomp$inline_1139.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1139.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
Expand All @@ -10230,26 +10290,26 @@ var internals$jscomp$inline_1372 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1138.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1139.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-b7e7f1a3-20240722"
reconcilerVersion: "19.0.0-www-modern-9cc0f6e6-20240723"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1374 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1373.isDisabled &&
hook$jscomp$inline_1373.supportsFiber
!hook$jscomp$inline_1374.isDisabled &&
hook$jscomp$inline_1374.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1373.inject(
internals$jscomp$inline_1372
(rendererID = hook$jscomp$inline_1374.inject(
internals$jscomp$inline_1373
)),
(injectedHook = hook$jscomp$inline_1373);
(injectedHook = hook$jscomp$inline_1374);
} catch (err) {}
}
var Path = Mode$1.Path;
Expand Down
Loading

0 comments on commit 288b7b7

Please sign in to comment.