Skip to content

Commit

Permalink
Make enableBigIntSupport a dynamic flag for Meta (#28617)
Browse files Browse the repository at this point in the history
Make enableBigIntSupport a dynamic flag for Meta

Should be an easy launch, but let's make this a dynamic flag to be safe.

DiffTrain build for [5a75f9e](5a75f9e)
  • Loading branch information
kassens committed Mar 25, 2024
1 parent 97218a1 commit 07e6503
Show file tree
Hide file tree
Showing 31 changed files with 405 additions and 249 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
527ed72bfd9f5c0045da468ad01db968a9961ad7
5a75f9e78544fa6d052aff7fe99607e48f35b979
12 changes: 7 additions & 5 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-www-classic-e33483b4";
var ReactVersion = "18.3.0-www-classic-1c9d7bd1";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -399,7 +399,8 @@ if (__DEV__) {
// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp;
Expand Down Expand Up @@ -2359,9 +2360,10 @@ if (__DEV__) {
invokeCallback = true;
} else {
switch (type) {
case "bigint": {
break;
}
case "bigint":
if (!enableBigIntSupport) {
break;
}

// fallthrough for enabled BigInt support

Expand Down
12 changes: 7 additions & 5 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-www-modern-5840c08e";
var ReactVersion = "18.3.0-www-modern-bbec48f4";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -399,7 +399,8 @@ if (__DEV__) {
// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp;
Expand Down Expand Up @@ -2315,9 +2316,10 @@ if (__DEV__) {
invokeCallback = true;
} else {
switch (type) {
case "bigint": {
break;
}
case "bigint":
if (!enableBigIntSupport) {
break;
}

// fallthrough for enabled BigInt support

Expand Down
5 changes: 4 additions & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray,
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
Expand Down Expand Up @@ -246,6 +247,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
if (!enableBigIntSupport) break;
case "string":
case "number":
invokeCallback = !0;
Expand Down Expand Up @@ -640,4 +643,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-af285d7f";
exports.version = "18.3.0-www-classic-3f1a7fba";
5 changes: 4 additions & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray,
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
Expand Down Expand Up @@ -207,6 +208,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
if (!enableBigIntSupport) break;
case "string":
case "number":
invokeCallback = !0;
Expand Down Expand Up @@ -632,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-6932c29f";
exports.version = "18.3.0-www-modern-e00f2544";
5 changes: 4 additions & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray,
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
Expand Down Expand Up @@ -250,6 +251,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
if (!enableBigIntSupport) break;
case "string":
case "number":
invokeCallback = !0;
Expand Down Expand Up @@ -644,7 +647,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-07a53cb8";
exports.version = "18.3.0-www-classic-b4c99f99";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
5 changes: 4 additions & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray,
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
Expand Down Expand Up @@ -211,6 +212,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
if (!enableBigIntSupport) break;
case "string":
case "number":
invokeCallback = !0;
Expand Down Expand Up @@ -636,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-d0117e88";
exports.version = "18.3.0-www-modern-ef66ad17";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
14 changes: 7 additions & 7 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-classic-c5031154";
var ReactVersion = "18.3.0-www-classic-df608462";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -163,7 +163,8 @@ if (__DEV__) {
// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
Expand Down Expand Up @@ -197,7 +198,6 @@ if (__DEV__) {
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,

var FunctionComponent = 0;
var ClassComponent = 1;
Expand Down Expand Up @@ -6865,7 +6865,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
Expand Down Expand Up @@ -7000,7 +7000,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
Expand Down Expand Up @@ -7127,7 +7127,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match.
Expand Down Expand Up @@ -7976,7 +7976,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
return placeSingleChild(
reconcileSingleTextNode(
Expand Down
14 changes: 7 additions & 7 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-modern-f907edbd";
var ReactVersion = "18.3.0-www-modern-b2ca28f2";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -163,7 +163,8 @@ if (__DEV__) {
// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
Expand Down Expand Up @@ -197,7 +198,6 @@ if (__DEV__) {
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.

var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,

var FunctionComponent = 0;
var ClassComponent = 1;
Expand Down Expand Up @@ -6630,7 +6630,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
Expand Down Expand Up @@ -6765,7 +6765,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
Expand Down Expand Up @@ -6892,7 +6892,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match.
Expand Down Expand Up @@ -7741,7 +7741,7 @@ if (__DEV__) {
if (
(typeof newChild === "string" && newChild !== "") ||
typeof newChild === "number" ||
enableBigIntSupport
(enableBigIntSupport && typeof newChild === "bigint")
) {
return placeSingleChild(
reconcileSingleTextNode(
Expand Down
17 changes: 11 additions & 6 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function formatProdErrorMessage(code) {
var ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
dynamicFeatureFlags = require("ReactFeatureFlags"),
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
enableLazyContextPropagation =
Expand Down Expand Up @@ -2032,7 +2033,8 @@ function createChildReconciler(shouldTrackSideEffects) {
function createChild(returnFiber, newChild, lanes) {
if (
("string" === typeof newChild && "" !== newChild) ||
"number" === typeof newChild
"number" === typeof newChild ||
(enableBigIntSupport && "bigint" === typeof newChild)
)
return (
(newChild = createFiberFromText(
Expand Down Expand Up @@ -2100,7 +2102,8 @@ function createChildReconciler(shouldTrackSideEffects) {
var key = null !== oldFiber ? oldFiber.key : null;
if (
("string" === typeof newChild && "" !== newChild) ||
"number" === typeof newChild
"number" === typeof newChild ||
(enableBigIntSupport && "bigint" === typeof newChild)
)
return null !== key
? null
Expand Down Expand Up @@ -2152,7 +2155,8 @@ function createChildReconciler(shouldTrackSideEffects) {
) {
if (
("string" === typeof newChild && "" !== newChild) ||
"number" === typeof newChild
"number" === typeof newChild ||
(enableBigIntSupport && "bigint" === typeof newChild)
)
return (
(existingChildren = existingChildren.get(newIdx) || null),
Expand Down Expand Up @@ -2529,7 +2533,8 @@ function createChildReconciler(shouldTrackSideEffects) {
throwOnInvalidObjectType(returnFiber, newChild);
}
return ("string" === typeof newChild && "" !== newChild) ||
"number" === typeof newChild
"number" === typeof newChild ||
(enableBigIntSupport && "bigint" === typeof newChild)
? ((newChild = "" + newChild),
null !== currentFirstChild && 6 === currentFirstChild.tag
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
Expand Down Expand Up @@ -10636,7 +10641,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-4a28a0e2",
version: "18.3.0-www-classic-0830bd6c",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1320 = {
Expand Down Expand Up @@ -10667,7 +10672,7 @@ var internals$jscomp$inline_1320 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-4a28a0e2"
reconcilerVersion: "18.3.0-www-classic-0830bd6c"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Loading

0 comments on commit 07e6503

Please sign in to comment.