Skip to content

Commit

Permalink
Fix unstable_useContextWithBailout dispatcher assignment (facebook#30692
Browse files Browse the repository at this point in the history
)

One more copy pasta fix

Assignments are unique now
```
% cat packages/react-reconciler/src/ReactFiberHooks.js | grep .unstable_useContextWithBailout
function unstable_useContextWithBailout<T>(
  (ContextOnlyDispatcher: Dispatcher).unstable_useContextWithBailout =
  (HooksDispatcherOnMount: Dispatcher).unstable_useContextWithBailout =
    unstable_useContextWithBailout;
  (HooksDispatcherOnUpdate: Dispatcher).unstable_useContextWithBailout =
    unstable_useContextWithBailout;
  (HooksDispatcherOnRerender: Dispatcher).unstable_useContextWithBailout =
    unstable_useContextWithBailout;
    (HooksDispatcherOnMountInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (HooksDispatcherOnUpdateInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (HooksDispatcherOnRerenderInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (InvalidNestedHooksDispatcherOnUpdateInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
    (InvalidNestedHooksDispatcherOnRerenderInDEV: Dispatcher).unstable_useContextWithBailout =
        return unstable_useContextWithBailout(context, select);
```

DiffTrain build for [0ad0fac](facebook@0ad0fac)
  • Loading branch information
jackpope committed Aug 14, 2024
1 parent b903fc0 commit e3cf3d5
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d48603a52564675ce02152fff245e38b6816da47
0ad0fac1dc11db8d5a6831987fb0324cd6d59498
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d48603a52564675ce02152fff245e38b6816da47
0ad0fac1dc11db8d5a6831987fb0324cd6d59498
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 @@ -2001,7 +2001,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
"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 @@ -1981,7 +1981,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
"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 @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
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 @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
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 @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
"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 @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15751,7 +15751,7 @@ __DEV__ &&
updateHookTypesDev();
return rerenderOptimistic(passthrough, reducer);
};
HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function (
HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function (
context,
select
) {
Expand Down Expand Up @@ -16776,11 +16776,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-d48603a5-20240813",
version: "19.0.0-www-classic-0ad0fac1-20240814",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-classic-0ad0fac1-20240814"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16814,7 +16814,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15155,7 +15155,7 @@ __DEV__ &&
updateHookTypesDev();
return rerenderOptimistic(passthrough, reducer);
};
HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function (
HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function (
context,
select
) {
Expand Down Expand Up @@ -16189,11 +16189,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-d48603a5-20240813",
version: "19.0.0-www-modern-0ad0fac1-20240814",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-modern-0ad0fac1-20240814"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16227,7 +16227,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10618,13 +10618,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1361 = {
bundleType: 0,
version: "19.0.0-www-classic-d48603a5-20240813",
version: "19.0.0-www-classic-0ad0fac1-20240814",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-classic-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-classic-0ad0fac1-20240814"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1362 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10650,4 +10650,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10132,13 +10132,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1353 = {
bundleType: 0,
version: "19.0.0-www-modern-d48603a5-20240813",
version: "19.0.0-www-modern-0ad0fac1-20240814",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-modern-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-modern-0ad0fac1-20240814"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1354 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10164,4 +10164,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
12 changes: 6 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -25878,7 +25878,7 @@ __DEV__ &&
updateHookTypesDev();
return rerenderOptimistic(passthrough, reducer);
};
HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function (
HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function (
context,
select
) {
Expand Down Expand Up @@ -27528,11 +27528,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-d48603a5-20240813" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-0ad0fac1-20240814" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-d48603a5-20240813\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-0ad0fac1-20240814\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27576,11 +27576,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-d48603a5-20240813",
version: "19.0.0-www-classic-0ad0fac1-20240814",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-classic-0ad0fac1-20240814"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28233,7 +28233,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
12 changes: 6 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24965,7 +24965,7 @@ __DEV__ &&
updateHookTypesDev();
return rerenderOptimistic(passthrough, reducer);
};
HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function (
HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function (
context,
select
) {
Expand Down Expand Up @@ -26613,11 +26613,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-d48603a5-20240813" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-0ad0fac1-20240814" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-modern-d48603a5-20240813\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-0ad0fac1-20240814\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26660,11 +26660,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-d48603a5-20240813",
version: "19.0.0-www-modern-0ad0fac1-20240814",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-modern-0ad0fac1-20240814"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -27269,7 +27269,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17170,14 +17170,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version;
if (
"19.0.0-www-classic-d48603a5-20240813" !==
"19.0.0-www-classic-0ad0fac1-20240814" !==
isomorphicReactPackageVersion$jscomp$inline_1753
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1753,
"19.0.0-www-classic-d48603a5-20240813"
"19.0.0-www-classic-0ad0fac1-20240814"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17222,11 +17222,11 @@ Internals.Events = [
];
var internals$jscomp$inline_2208 = {
bundleType: 0,
version: "19.0.0-www-classic-d48603a5-20240813",
version: "19.0.0-www-classic-0ad0fac1-20240814",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-classic-0ad0fac1-20240814"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2209 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17682,4 +17682,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16544,14 +16544,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version;
if (
"19.0.0-www-modern-d48603a5-20240813" !==
"19.0.0-www-modern-0ad0fac1-20240814" !==
isomorphicReactPackageVersion$jscomp$inline_1724
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1724,
"19.0.0-www-modern-d48603a5-20240813"
"19.0.0-www-modern-0ad0fac1-20240814"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -16569,11 +16569,11 @@ Internals.Events = [
];
var internals$jscomp$inline_2199 = {
bundleType: 0,
version: "19.0.0-www-modern-d48603a5-20240813",
version: "19.0.0-www-modern-0ad0fac1-20240814",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-modern-0ad0fac1-20240814"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2200 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16936,4 +16936,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-d48603a5-20240813";
exports.version = "19.0.0-www-modern-0ad0fac1-20240814";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17949,14 +17949,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1841 = React.version;
if (
"19.0.0-www-classic-d48603a5-20240813" !==
"19.0.0-www-classic-0ad0fac1-20240814" !==
isomorphicReactPackageVersion$jscomp$inline_1841
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1841,
"19.0.0-www-classic-d48603a5-20240813"
"19.0.0-www-classic-0ad0fac1-20240814"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -18001,11 +18001,11 @@ Internals.Events = [
];
var internals$jscomp$inline_1848 = {
bundleType: 0,
version: "19.0.0-www-classic-d48603a5-20240813",
version: "19.0.0-www-classic-0ad0fac1-20240814",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-d48603a5-20240813"
reconcilerVersion: "19.0.0-www-classic-0ad0fac1-20240814"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1848.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18464,7 +18464,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-d48603a5-20240813";
exports.version = "19.0.0-www-classic-0ad0fac1-20240814";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit e3cf3d5

Please sign in to comment.