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

Turn off enableYieldingBeforePassive #31857

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Dec 19, 2024

The flag causes passive effects to not fire if they were part of a suspensey commit. Potential forward-fix in #31858

test plan

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 7:09pm

@react-sizebot
Copy link

react-sizebot commented Dec 19, 2024

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against 841e658

resolveSuspenseyThing('A');
});

assertLog(['flush effect']);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

log is empty with enableYieldingBeforePassive turned on

@@ -78,7 +78,8 @@ export const enableLegacyFBSupport = false;
// -----------------------------------------------------------------------------

// Yield to the browser event loop and not just the scheduler event loop before passive effects.
export const enableYieldingBeforePassive = __EXPERIMENTAL__;
// Fix gated tests that fail with this flag enabled before turning it back on.
export const enableYieldingBeforePassive = 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.

Should I add this as a variant to ReactFeatureFlags.www-dynamic.js in the meantime even though there is no GK associated with it yet?

Copy link
Member

Choose a reason for hiding this comment

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

yes please, but just doing that won't enable the variant tests, you can do that by adding it here:

actual.disableInputAttributeSyncing = __VARIANT__;

Copy link
Member

Choose a reason for hiding this comment

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

If you do that and tests fail though, just revert and I can look into enabling it

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a heads up, the RN sync is blocked due to failing tests (likely the same bug from your unit test since its asserting a function from an effect was called after resolving some Relay data) since this change leaked into the Scheduler-dev build there.

I just merged #31859 to unblock the sync. But it may make sense to just revert this flag to false until we have a fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

likely the same bug from your unit test since its asserting a function from an effect was called after resolving some Relay data

That might actually be an expected one where they previously relied on passive effects being flushed synchronously. Do they wrap the function that resolves the promise in act()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes please, but just doing that won't enable the variant tests, you can do that by adding it here:

Like this 9948ef5 (#31857)?

Copy link
Collaborator Author

@eps1lon eps1lon Dec 19, 2024

Choose a reason for hiding this comment

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

Seems like we didn't gate a bunch of tests on this: https://github.com/facebook/react/actions/runs/12418967266/job/34673303185?pr=31857. Reverting the variant change for now to unblock the sync.

This reverts commit 9948ef5.
A bunch of tests weren't gated on this behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants