Skip to content

Commit 31e777b

Browse files
committed
[compiler] ValidatePreservedManualMemoization reports detailed errors
This pass didn't previously report the precise difference btw inferred/manual dependencies unless a debug flag was set. But the error message is really good (nice job mofeiz): the only catch is that in theory the inferred dep could be a temporary that can't trivially be reported to the user. But the messages are really useful for quickly verifying why the compiler couldn't preserve memoization. So here we switch to outputting a detailed message about the discrepancy btw inferred/manual deps so long as the inferred dep root is a named variable. I also slightly adjusted the message to handle the case where there is no diagnostic, which can occur if there were no manual deps but the compiler inferred a dependency. ghstack-source-id: 534f6f1 Pull Request resolved: #33095 DiffTrain build for [73d7e81](73d7e81)
1 parent 4c4b5dc commit 31e777b

26 files changed

+171
-97
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-ac2cae52-20250503
1+
19.2.0-native-fb-73d7e816-20250503

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<3a8e713f412b3794cee2c3089ed3d3c2>>
10+
* @generated SignedSource<<dadf06a20985029b6861a4307fb1da98>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
407+
exports.version = "19.2.0-native-fb-73d7e816-20250503";
408408
})();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6a8ce524bc621b2c0f8ab229a0f9eaf0>>
10+
* @generated SignedSource<<1356d4b7847e2241f243d75788b823dc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
206+
exports.version = "19.2.0-native-fb-73d7e816-20250503";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6a8ce524bc621b2c0f8ab229a0f9eaf0>>
10+
* @generated SignedSource<<1356d4b7847e2241f243d75788b823dc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
206+
exports.version = "19.2.0-native-fb-73d7e816-20250503";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d999b69864aa6594360027e7244bf1fb>>
10+
* @generated SignedSource<<ee64ceeff7fe57a7c3dd0420d0476eca>>
1111
*/
1212

1313
/*
@@ -26650,11 +26650,11 @@ __DEV__ &&
2665026650
};
2665126651
(function () {
2665226652
var isomorphicReactPackageVersion = React.version;
26653-
if ("19.2.0-native-fb-ac2cae52-20250503" !== isomorphicReactPackageVersion)
26653+
if ("19.2.0-native-fb-73d7e816-20250503" !== isomorphicReactPackageVersion)
2665426654
throw Error(
2665526655
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2665626656
(isomorphicReactPackageVersion +
26657-
"\n - react-dom: 19.2.0-native-fb-ac2cae52-20250503\nLearn more: https://react.dev/warnings/version-mismatch")
26657+
"\n - react-dom: 19.2.0-native-fb-73d7e816-20250503\nLearn more: https://react.dev/warnings/version-mismatch")
2665826658
);
2665926659
})();
2666026660
("function" === typeof Map &&
@@ -26691,10 +26691,10 @@ __DEV__ &&
2669126691
!(function () {
2669226692
var internals = {
2669326693
bundleType: 1,
26694-
version: "19.2.0-native-fb-ac2cae52-20250503",
26694+
version: "19.2.0-native-fb-73d7e816-20250503",
2669526695
rendererPackageName: "react-dom",
2669626696
currentDispatcherRef: ReactSharedInternals,
26697-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503"
26697+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503"
2669826698
};
2669926699
internals.overrideHookState = overrideHookState;
2670026700
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26838,5 +26838,5 @@ __DEV__ &&
2683826838
listenToAllSupportedEvents(container);
2683926839
return new ReactDOMHydrationRoot(initialChildren);
2684026840
};
26841-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
26841+
exports.version = "19.2.0-native-fb-73d7e816-20250503";
2684226842
})();

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6a7f6ee6e3e54d5c956e50d34914495a>>
10+
* @generated SignedSource<<6d9d3190d467f241fb17f29ff0850020>>
1111
*/
1212

1313
/*
@@ -16748,14 +16748,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1674816748
};
1674916749
var isomorphicReactPackageVersion$jscomp$inline_1904 = React.version;
1675016750
if (
16751-
"19.2.0-native-fb-ac2cae52-20250503" !==
16751+
"19.2.0-native-fb-73d7e816-20250503" !==
1675216752
isomorphicReactPackageVersion$jscomp$inline_1904
1675316753
)
1675416754
throw Error(
1675516755
formatProdErrorMessage(
1675616756
527,
1675716757
isomorphicReactPackageVersion$jscomp$inline_1904,
16758-
"19.2.0-native-fb-ac2cae52-20250503"
16758+
"19.2.0-native-fb-73d7e816-20250503"
1675916759
)
1676016760
);
1676116761
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16777,10 +16777,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1677716777
};
1677816778
var internals$jscomp$inline_2388 = {
1677916779
bundleType: 0,
16780-
version: "19.2.0-native-fb-ac2cae52-20250503",
16780+
version: "19.2.0-native-fb-73d7e816-20250503",
1678116781
rendererPackageName: "react-dom",
1678216782
currentDispatcherRef: ReactSharedInternals,
16783-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503"
16783+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503"
1678416784
};
1678516785
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1678616786
var hook$jscomp$inline_2389 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16884,4 +16884,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1688416884
listenToAllSupportedEvents(container);
1688516885
return new ReactDOMHydrationRoot(initialChildren);
1688616886
};
16887-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
16887+
exports.version = "19.2.0-native-fb-73d7e816-20250503";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<c95103b4e5c15fa20d15fdc7236baebc>>
10+
* @generated SignedSource<<c0abbf2f409f4e2593303a82962b6a44>>
1111
*/
1212

1313
/*
@@ -17457,14 +17457,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1745717457
};
1745817458
var isomorphicReactPackageVersion$jscomp$inline_2007 = React.version;
1745917459
if (
17460-
"19.2.0-native-fb-ac2cae52-20250503" !==
17460+
"19.2.0-native-fb-73d7e816-20250503" !==
1746117461
isomorphicReactPackageVersion$jscomp$inline_2007
1746217462
)
1746317463
throw Error(
1746417464
formatProdErrorMessage(
1746517465
527,
1746617466
isomorphicReactPackageVersion$jscomp$inline_2007,
17467-
"19.2.0-native-fb-ac2cae52-20250503"
17467+
"19.2.0-native-fb-73d7e816-20250503"
1746817468
)
1746917469
);
1747017470
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17486,10 +17486,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1748617486
};
1748717487
var internals$jscomp$inline_2014 = {
1748817488
bundleType: 0,
17489-
version: "19.2.0-native-fb-ac2cae52-20250503",
17489+
version: "19.2.0-native-fb-73d7e816-20250503",
1749017490
rendererPackageName: "react-dom",
1749117491
currentDispatcherRef: ReactSharedInternals,
17492-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503",
17492+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503",
1749317493
getLaneLabelMap: function () {
1749417494
for (
1749517495
var map = new Map(), lane = 1, index$305 = 0;
@@ -17608,4 +17608,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1760817608
listenToAllSupportedEvents(container);
1760917609
return new ReactDOMHydrationRoot(initialChildren);
1761017610
};
17611-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
17611+
exports.version = "19.2.0-native-fb-73d7e816-20250503";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e660219c89547290a57109978206e297>>
10+
* @generated SignedSource<<8b4ad26c11c18be45d376afb6d7cf2d6>>
1111
*/
1212

1313
/*
@@ -26711,11 +26711,11 @@ __DEV__ &&
2671126711
};
2671226712
(function () {
2671326713
var isomorphicReactPackageVersion = React.version;
26714-
if ("19.2.0-native-fb-ac2cae52-20250503" !== isomorphicReactPackageVersion)
26714+
if ("19.2.0-native-fb-73d7e816-20250503" !== isomorphicReactPackageVersion)
2671526715
throw Error(
2671626716
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2671726717
(isomorphicReactPackageVersion +
26718-
"\n - react-dom: 19.2.0-native-fb-ac2cae52-20250503\nLearn more: https://react.dev/warnings/version-mismatch")
26718+
"\n - react-dom: 19.2.0-native-fb-73d7e816-20250503\nLearn more: https://react.dev/warnings/version-mismatch")
2671926719
);
2672026720
})();
2672126721
("function" === typeof Map &&
@@ -26752,10 +26752,10 @@ __DEV__ &&
2675226752
!(function () {
2675326753
var internals = {
2675426754
bundleType: 1,
26755-
version: "19.2.0-native-fb-ac2cae52-20250503",
26755+
version: "19.2.0-native-fb-73d7e816-20250503",
2675626756
rendererPackageName: "react-dom",
2675726757
currentDispatcherRef: ReactSharedInternals,
26758-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503"
26758+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503"
2675926759
};
2676026760
internals.overrideHookState = overrideHookState;
2676126761
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -27215,7 +27215,7 @@ __DEV__ &&
2721527215
exports.useFormStatus = function () {
2721627216
return resolveDispatcher().useHostTransitionStatus();
2721727217
};
27218-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
27218+
exports.version = "19.2.0-native-fb-73d7e816-20250503";
2721927219
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2722027220
"function" ===
2722127221
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<184c3d14507009449d6281a2251dd50f>>
10+
* @generated SignedSource<<e029fcb0c9ead7bd9bc6565bb7136915>>
1111
*/
1212

1313
/*
@@ -16759,14 +16759,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1675916759
};
1676016760
var isomorphicReactPackageVersion$jscomp$inline_1905 = React.version;
1676116761
if (
16762-
"19.2.0-native-fb-ac2cae52-20250503" !==
16762+
"19.2.0-native-fb-73d7e816-20250503" !==
1676316763
isomorphicReactPackageVersion$jscomp$inline_1905
1676416764
)
1676516765
throw Error(
1676616766
formatProdErrorMessage(
1676716767
527,
1676816768
isomorphicReactPackageVersion$jscomp$inline_1905,
16769-
"19.2.0-native-fb-ac2cae52-20250503"
16769+
"19.2.0-native-fb-73d7e816-20250503"
1677016770
)
1677116771
);
1677216772
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16788,10 +16788,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1678816788
};
1678916789
var internals$jscomp$inline_2391 = {
1679016790
bundleType: 0,
16791-
version: "19.2.0-native-fb-ac2cae52-20250503",
16791+
version: "19.2.0-native-fb-73d7e816-20250503",
1679216792
rendererPackageName: "react-dom",
1679316793
currentDispatcherRef: ReactSharedInternals,
16794-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503"
16794+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503"
1679516795
};
1679616796
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1679716797
var hook$jscomp$inline_2392 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17049,4 +17049,4 @@ exports.useFormState = function (action, initialState, permalink) {
1704917049
exports.useFormStatus = function () {
1705017050
return ReactSharedInternals.H.useHostTransitionStatus();
1705117051
};
17052-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
17052+
exports.version = "19.2.0-native-fb-73d7e816-20250503";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6bed75389bb636f888f94799d1e7e022>>
10+
* @generated SignedSource<<f32349997f1a98bef7fc91ebd98f2658>>
1111
*/
1212

1313
/*
@@ -17472,14 +17472,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1747217472
};
1747317473
var isomorphicReactPackageVersion$jscomp$inline_2008 = React.version;
1747417474
if (
17475-
"19.2.0-native-fb-ac2cae52-20250503" !==
17475+
"19.2.0-native-fb-73d7e816-20250503" !==
1747617476
isomorphicReactPackageVersion$jscomp$inline_2008
1747717477
)
1747817478
throw Error(
1747917479
formatProdErrorMessage(
1748017480
527,
1748117481
isomorphicReactPackageVersion$jscomp$inline_2008,
17482-
"19.2.0-native-fb-ac2cae52-20250503"
17482+
"19.2.0-native-fb-73d7e816-20250503"
1748317483
)
1748417484
);
1748517485
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17501,10 +17501,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1750117501
};
1750217502
var internals$jscomp$inline_2015 = {
1750317503
bundleType: 0,
17504-
version: "19.2.0-native-fb-ac2cae52-20250503",
17504+
version: "19.2.0-native-fb-73d7e816-20250503",
1750517505
rendererPackageName: "react-dom",
1750617506
currentDispatcherRef: ReactSharedInternals,
17507-
reconcilerVersion: "19.2.0-native-fb-ac2cae52-20250503",
17507+
reconcilerVersion: "19.2.0-native-fb-73d7e816-20250503",
1750817508
getLaneLabelMap: function () {
1750917509
for (
1751017510
var map = new Map(), lane = 1, index$305 = 0;
@@ -17777,7 +17777,7 @@ exports.useFormState = function (action, initialState, permalink) {
1777717777
exports.useFormStatus = function () {
1777817778
return ReactSharedInternals.H.useHostTransitionStatus();
1777917779
};
17780-
exports.version = "19.2.0-native-fb-ac2cae52-20250503";
17780+
exports.version = "19.2.0-native-fb-73d7e816-20250503";
1778117781
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1778217782
"function" ===
1778317783
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)