GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Enable the StrictEffects flag for OSS builds by gaearon · Pull Request #21590 · react/react Conversation
|
| // Helps identify code that is not safe for planned Offscreen API and Suspense semantics; | ||
| // this feature flag only impacts StrictEffectsMode. | ||
| export const enableStrictEffects = false; | ||
| export const enableStrictEffects = true; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| export const enableStrictEffects = true; | |
| export const enableStrictEffects = __DEV__; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I could do this but there's a small inconsistency in that the WWW version re-exports a GK which does not have a DEV check. I'd rather have them all consistent. Currently I think we always check for __DEV__ in the source anyway before any behavioral changes. So I'd propose either:
true__DEV__ and change WWW feature flag to be __DEV__ && FeatureFlagsWWW.enableStrictEffects
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to compare to other flags within this feature flags file rather than www. So this would be more like debugRenderPhaseSideEffectsForStrictMode right above it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Currently I think we always check for
__DEV__in the source anyway before any behavioral changes.
Yeah, but this is to enable static dead code elimination in production builds even if there's a dynamic flag (like in www). I think the feature flags still generally use __DEV__ or __PROFILING__ to be explicit. :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to compare to other flags within this feature flags file rather than www.
I'm thinking of a situation where we add some behavior difference in the source without checking __DEV__ before it (by mistake). Then, if WWW and OSS flags diverge in this way, you'd see the different behavior in production on WWW than in production in OSS. That seems like a risky divergence.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Then let's change the OSS www export too.
There's good reason to keep the extra static __DEV__ wrapper (mentioned above) and I think there's also value in keeping the feature flags more scoped/explicit about DEV-only features.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Whoops.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Comparing: d75105f...187567b Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This failure is curious: That test has |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
PR #20639 landed "strict effects" for new root API only, but when #20849 introduced strict mode levels, it looks like the new root check got changed the check from (workInProgress.mode & (BlockingMode | ConcurrentMode)) !== NoMode to (workInProgress.mode & StrictEffectsMode) !== NoMode I don't remember if this was intentional, although maybe it was since the new level required an explicit opt-in (and wouldn't be rolled out to pre-existing strict trees)? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
#21591 should correct the above issue and fix the failing tests in this branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Now that #21591 has landed, we should be good to rebase and land this one! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Since you're off today I'm going to go ahead and take up the two action items left over from this PR with #21597 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.