Skip to content

Commit 44b064d

Browse files
committed
[compiler][rfc] Hacky retry pipeline for fire (facebook#32164)
Hacky retry pipeline for when transforming `fire(...)` calls encounters validation, todo, or memoization invariant bailouts. Would love feedback on how we implement this to be extensible to other compiler non-memoization features (e.g. inlineJSX) Some observations: - Compiler "front-end" passes (e.g. lower, type, effect, and mutability inferences) should be shared for all compiler features -- memo and otherwise - Many passes (anything dealing with reactive scope ranges, scope blocks / dependencies, and optimizations such as ReactiveIR facebook#31974) can be left out of the retry pipeline. This PR hackily skips memoization features by removing reactive scope creation, but we probably should restructure the pipeline to skip these entirely on a retry - We should maintain a canonical set of "validation flags" Note the newly added fixtures are prefixed with `bailout-...` when the retry fire pipeline is used. These fixture outputs contain correctly inserted `useFire` calls and no memoization. DiffTrain build for [152bfe3](facebook@152bfe3)
1 parent 8ca286b commit 44b064d

34 files changed

+86
-146
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ff42a8798863c995523e284142b47e3cdfaee80
1+
152bfe3769f87e29c8d68cb87fdb608d2483b7f1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ff42a8798863c995523e284142b47e3cdfaee80
1+
152bfe3769f87e29c8d68cb87fdb608d2483b7f1

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ __DEV__ &&
19581958
exports.useTransition = function () {
19591959
return resolveDispatcher().useTransition();
19601960
};
1961-
exports.version = "19.1.0-www-classic-9ff42a87-20250130";
1961+
exports.version = "19.1.0-www-classic-152bfe37-20250131";
19621962
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19631963
"function" ===
19641964
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ __DEV__ &&
19581958
exports.useTransition = function () {
19591959
return resolveDispatcher().useTransition();
19601960
};
1961-
exports.version = "19.1.0-www-modern-9ff42a87-20250130";
1961+
exports.version = "19.1.0-www-modern-152bfe37-20250131";
19621962
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19631963
"function" ===
19641964
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
630630
exports.useTransition = function () {
631631
return ReactSharedInternals.H.useTransition();
632632
};
633-
exports.version = "19.1.0-www-classic-9ff42a87-20250130";
633+
exports.version = "19.1.0-www-classic-152bfe37-20250131";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
630630
exports.useTransition = function () {
631631
return ReactSharedInternals.H.useTransition();
632632
};
633-
exports.version = "19.1.0-www-modern-9ff42a87-20250130";
633+
exports.version = "19.1.0-www-modern-152bfe37-20250131";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
634634
exports.useTransition = function () {
635635
return ReactSharedInternals.H.useTransition();
636636
};
637-
exports.version = "19.1.0-www-classic-9ff42a87-20250130";
637+
exports.version = "19.1.0-www-classic-152bfe37-20250131";
638638
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
639639
"function" ===
640640
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
634634
exports.useTransition = function () {
635635
return ReactSharedInternals.H.useTransition();
636636
};
637-
exports.version = "19.1.0-www-modern-9ff42a87-20250130";
637+
exports.version = "19.1.0-www-modern-152bfe37-20250131";
638638
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
639639
"function" ===
640640
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10917,9 +10917,6 @@ __DEV__ &&
1091710917
hostParentIsContainer = !1;
1091810918
break a;
1091910919
case 3:
10920-
hostParent = parent.stateNode.containerInfo;
10921-
hostParentIsContainer = !0;
10922-
break a;
1092310920
case 4:
1092410921
hostParent = parent.stateNode.containerInfo;
1092510922
hostParentIsContainer = !0;
@@ -16935,10 +16932,10 @@ __DEV__ &&
1693516932
(function () {
1693616933
var internals = {
1693716934
bundleType: 1,
16938-
version: "19.1.0-www-classic-9ff42a87-20250130",
16935+
version: "19.1.0-www-classic-152bfe37-20250131",
1693916936
rendererPackageName: "react-art",
1694016937
currentDispatcherRef: ReactSharedInternals,
16941-
reconcilerVersion: "19.1.0-www-classic-9ff42a87-20250130"
16938+
reconcilerVersion: "19.1.0-www-classic-152bfe37-20250131"
1694216939
};
1694316940
internals.overrideHookState = overrideHookState;
1694416941
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16972,7 +16969,7 @@ __DEV__ &&
1697216969
exports.Shape = Shape;
1697316970
exports.Surface = Surface;
1697416971
exports.Text = Text;
16975-
exports.version = "19.1.0-www-classic-9ff42a87-20250130";
16972+
exports.version = "19.1.0-www-classic-152bfe37-20250131";
1697616973
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1697716974
"function" ===
1697816975
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10735,9 +10735,6 @@ __DEV__ &&
1073510735
hostParentIsContainer = !1;
1073610736
break a;
1073710737
case 3:
10738-
hostParent = parent.stateNode.containerInfo;
10739-
hostParentIsContainer = !0;
10740-
break a;
1074110738
case 4:
1074210739
hostParent = parent.stateNode.containerInfo;
1074310740
hostParentIsContainer = !0;
@@ -16707,10 +16704,10 @@ __DEV__ &&
1670716704
(function () {
1670816705
var internals = {
1670916706
bundleType: 1,
16710-
version: "19.1.0-www-modern-9ff42a87-20250130",
16707+
version: "19.1.0-www-modern-152bfe37-20250131",
1671116708
rendererPackageName: "react-art",
1671216709
currentDispatcherRef: ReactSharedInternals,
16713-
reconcilerVersion: "19.1.0-www-modern-9ff42a87-20250130"
16710+
reconcilerVersion: "19.1.0-www-modern-152bfe37-20250131"
1671416711
};
1671516712
internals.overrideHookState = overrideHookState;
1671616713
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16744,7 +16741,7 @@ __DEV__ &&
1674416741
exports.Shape = Shape;
1674516742
exports.Surface = Surface;
1674616743
exports.Text = Text;
16747-
exports.version = "19.1.0-www-modern-9ff42a87-20250130";
16744+
exports.version = "19.1.0-www-modern-152bfe37-20250131";
1674816745
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1674916746
"function" ===
1675016747
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)