-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FB-only] Show which hooks (indices) changed when profiling #20998
Merged
bvaughn
merged 4 commits into
facebook:master
from
bvaughn:devtools-profiler-changed-hook-indices
Mar 17, 2021
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
const {resolve} = require('path'); | ||
const {DefinePlugin} = require('webpack'); | ||
const {GITHUB_URL, getVersionString} = require('./utils'); | ||
const {resolveFeatureFlags} = require('react-devtools-shared/buildUtils'); | ||
|
||
const NODE_ENV = process.env.NODE_ENV; | ||
if (!NODE_ENV) { | ||
|
@@ -16,6 +17,8 @@ const __DEV__ = NODE_ENV === 'development'; | |
|
||
const DEVTOOLS_VERSION = getVersionString(); | ||
|
||
const featureFlagTarget = process.env.FEATURE_FLAG_TARGET || 'extension-oss'; | ||
|
||
module.exports = { | ||
mode: __DEV__ ? 'development' : 'production', | ||
devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, | ||
|
@@ -34,6 +37,7 @@ module.exports = { | |
alias: { | ||
react: resolve(builtModulesDir, 'react'), | ||
'react-debug-tools': resolve(builtModulesDir, 'react-debug-tools'), | ||
'react-devtools-feature-flags': resolveFeatureFlags(featureFlagTarget), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was an accidental omission from when I added the flags files. |
||
'react-dom': resolve(builtModulesDir, 'react-dom'), | ||
'react-is': resolve(builtModulesDir, 'react-is'), | ||
scheduler: resolve(builtModulesDir, 'scheduler'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
/************************************************************************ | ||
* This file is forked between different DevTools implementations. | ||
* It should never be imported directly! | ||
* It should always be imported from "react-devtools-feature-flags". | ||
************************************************************************/ | ||
|
||
export const enableProfilerChangedHookIndices = false; | ||
|
||
/************************************************************************ | ||
* Do not edit the code below. | ||
* It ensures this fork exports the same types as the default flags file. | ||
************************************************************************/ | ||
|
||
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; | ||
import typeof * as ExportsType from './DevToolsFeatureFlags.extension-oss'; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
type Check<_X, Y: _X, X: Y = _X> = null; | ||
// eslint-disable-next-line no-unused-expressions | ||
(null: Check<ExportsType, FeatureFlagsType>); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is only used by the internal FB build tool to create the Chef-installed extension. So this change will cause that build to use the FB feature flags file.