Skip to content

Commit 08b8f37

Browse files
committed
Remove Warning: prefix and toString on console Arguments (#29839)
Basically make `console.error` and `console.warn` behave like normal - when a component stack isn't appended. I need this because I need to be able to print rich logs with the component stack option and to be able to disable instrumentation completely in `console.createTask` environments that don't need it. Currently we can't print logs with richer objects because they're toString:ed first. In practice, pretty much all arguments we log are already toString:ed so it's not necessary anyway. Some might be like a number. So it would only be a problem if some environment can't handle proper consoles but then it's up to that environment to toString it before logging. The `Warning: ` prefix is historic and is both noisy and confusing. It's mostly unnecessary since the UI surrounding `console.error` and `console.warn` tend to have visual treatment around it anyway. However, it's actively misleading when `console.error` gets prefixed with a Warning that we consider an error level. There's an argument to be made that some of our `console.error` don't make the bar for an error but then the argument is to downgrade each of those to `console.warn` - not to brand all our actual error logging with `Warning: `. Apparently something needs to change in React Native before landing this because it depends on the prefix somehow which probably doesn't make sense already. DiffTrain build for [2774208](2774208)
1 parent fcd1411 commit 08b8f37

35 files changed

+97
-97
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c2ae9e28bc02fdd29c46b247d908e6b467ef06af
1+
277420803947724b43c47bbc47d3a353553868f1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c2ae9e28bc02fdd29c46b247d908e6b467ef06af
1+
277420803947724b43c47bbc47d3a353553868f1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ __DEV__ &&
19801980
exports.useTransition = function () {
19811981
return resolveDispatcher().useTransition();
19821982
};
1983-
exports.version = "19.0.0-www-classic-c2ae9e28bc-20240608";
1983+
exports.version = "19.0.0-www-classic-2774208039-20240610";
19841984
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19851985
"function" ===
19861986
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
@@ -1960,7 +1960,7 @@ __DEV__ &&
19601960
exports.useTransition = function () {
19611961
return resolveDispatcher().useTransition();
19621962
};
1963-
exports.version = "19.0.0-www-modern-c2ae9e28bc-20240608";
1963+
exports.version = "19.0.0-www-modern-2774208039-20240610";
19641964
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19651965
"function" ===
19661966
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
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-classic-c2ae9e28bc-20240608";
668+
exports.version = "19.0.0-www-classic-2774208039-20240610";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-modern-c2ae9e28bc-20240608";
668+
exports.version = "19.0.0-www-modern-2774208039-20240610";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-classic-c2ae9e28bc-20240608";
672+
exports.version = "19.0.0-www-classic-2774208039-20240610";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
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
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-modern-c2ae9e28bc-20240608";
672+
exports.version = "19.0.0-www-modern-2774208039-20240610";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16922,14 +16922,14 @@ __DEV__ &&
1692216922
scheduleRoot: scheduleRoot,
1692316923
setRefreshHandler: setRefreshHandler,
1692416924
getCurrentFiber: getCurrentFiberForDevTools,
16925-
reconcilerVersion: "19.0.0-www-classic-c2ae9e28bc-20240608"
16925+
reconcilerVersion: "19.0.0-www-classic-2774208039-20240610"
1692616926
});
1692716927
})({
1692816928
findFiberByHostInstance: function () {
1692916929
return null;
1693016930
},
1693116931
bundleType: 1,
16932-
version: "19.0.0-www-classic-c2ae9e28bc-20240608",
16932+
version: "19.0.0-www-classic-2774208039-20240610",
1693316933
rendererPackageName: "react-art"
1693416934
});
1693516935
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16362,14 +16362,14 @@ __DEV__ &&
1636216362
scheduleRoot: scheduleRoot,
1636316363
setRefreshHandler: setRefreshHandler,
1636416364
getCurrentFiber: getCurrentFiberForDevTools,
16365-
reconcilerVersion: "19.0.0-www-modern-c2ae9e28bc-20240608"
16365+
reconcilerVersion: "19.0.0-www-modern-2774208039-20240610"
1636616366
});
1636716367
})({
1636816368
findFiberByHostInstance: function () {
1636916369
return null;
1637016370
},
1637116371
bundleType: 1,
16372-
version: "19.0.0-www-modern-c2ae9e28bc-20240608",
16372+
version: "19.0.0-www-modern-2774208039-20240610",
1637316373
rendererPackageName: "react-art"
1637416374
});
1637516375
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

0 commit comments

Comments
 (0)