Skip to content
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

Adjust consoleManagedByDevToolsDuringStrictMode feature flag #22253

Merged
merged 1 commit into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ export const allowConcurrentByDefault = false;

export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = false;
export const consoleManagedByDevToolsDuringStrictMode = true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be true because it's OSS web React, which is managed by DevTools

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an oversight from the previous PR. Thanks for catching.

2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableSyncDefaultUpdates = true;
export const allowConcurrentByDefault = false;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be false because test renderer doesn't talk to DevTools

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and other test flag changes below) seems reasonable.


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableSyncDefaultUpdates = true;
export const allowConcurrentByDefault = true;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be false because test renderer doesn't talk to DevTools


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableSyncDefaultUpdates = true;
export const allowConcurrentByDefault = true;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be false because test renderer doesn't talk to DevTools


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableSyncDefaultUpdates = true;
export const allowConcurrentByDefault = false;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be false because the "testing" builds of ReactDOM (which we currently don't actually use) would run in an environment that probably doesn't have DevTools, so it's not clear to me that this makes sense there


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.testing.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableSyncDefaultUpdates = true;
export const allowConcurrentByDefault = true;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to be false because the "testing" builds of ReactDOM (which we currently don't actually use) would run in an environment that probably doesn't have DevTools, so it's not clear to me that this makes sense there


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.www-dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ export const enableSyncDefaultUpdates = __VARIANT__;
export const allowConcurrentByDefault = true;
export const enablePersistentOffscreenHostContainer = false;

export const consoleManagedByDevToolsDuringStrictMode = true;
export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions in this file tell me to use the VARIANT configuration instead of hardcoding a value so I assume that's what I should do

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion about this change one way or another. We have several other hard-coded values in this file, FWIW.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly those were originally TODOs that failed when this file was introduced. At the time the assumption was that we’d convert them all, and that any newly added ones should be added above (and use VARIANT). Maybe we should make that comment clearer.