Skip to content

Commit 291e7d7

Browse files
author
RoFlection Bot
committed
APPFDN-3248 React Profiler flags (#426)
This PR makes it possible to use `React.Profiler` in production code by setting the `_G.__PROFILE__` flag. In particular, we: 1. Disable `enableProfiling` from SchedulerFeatureFlags.lua to be consistent with [upstream](https://github.com/facebook/react/blob/main/packages/scheduler/src/SchedulerFeatureFlags.js#L10) 3. Disable `enableSchedulerTracing` since it was removed in newer versions [upstream](facebook/react#20037) 2. Enable `enableProfilerCommitHooks` to be consistent with [upstream](https://github.com/facebook/react/blob/main/packages/shared/ReactFeatureFlags.js#L252-L253) I also deleted an old workflow which was failing OSS leak scan. It was set up to send PR review reminders to a now-defunct channel, so it was obviously not being used. We can add this back later if the team decides they want it in the future. Checklist before submitting: * [ ] Added/updated relevant tests * [ ] Added/updated documentation
1 parent 05c3de4 commit 291e7d7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/scheduler/src/SchedulerFeatureFlags.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
return {
1212
enableSchedulerDebugging = false,
1313
enableIsInputPending = false,
14-
enableProfiling = _G.__PROFILE__,
14+
enableProfiling = false,
1515
}

modules/shared/src/ReactFeatureFlags.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ exports.warnAboutDeprecatedLifecycles = true
4848
exports.enableProfilerTimer = _G.__PROFILE__
4949

5050
-- Record durations for commit and passive effects phases.
51-
exports.enableProfilerCommitHooks = false
51+
exports.enableProfilerCommitHooks = _G.__PROFILE__
5252

5353
-- Trace which interactions trigger each commit.
54-
exports.enableSchedulerTracing = _G.__PROFILE__
54+
exports.enableSchedulerTracing = false
5555

5656
-- SSR experiments
5757
exports.enableSuspenseServerRenderer = _G.__EXPERIMENTAL__

rotriever.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
version = "17.1.14"
2+
version = "17.1.15"
33
members = ["modules/*"]
44
authors = [
55
"Paul Doyle <pdoyle@roblox.com>",

0 commit comments

Comments
 (0)