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

[compiler] Allow global mutation effects in arguments passed to hooks and in return values #30576

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

mvitousek
Copy link
Contributor

@mvitousek mvitousek commented Aug 2, 2024

Stack from ghstack (oldest at bottom):

In investigating the results of #30572 we discovered a lot of false positives from when functions containing possibly-effectful calls were returned from hooks or passed into hooks. This corresponds to similar issues for GlobalMutations, because the effectful call work uses the same FunctionEffect infra. This fixes the infra to allow GlobalMutation function effects in return and throw terminals and in all hook arguments.

Copy link

vercel bot commented Aug 2, 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 Aug 2, 2024 8:57am

@mvitousek
Copy link
Contributor Author

Note that this is still not sufficient to address many of the false positives found by the probably-mutating function call analysis. #30458 or something similar is needed as well.

…ed to hooks and in return values"


In investigating the results of #30572 we discovered a lot of false positives from when functions containing possibly-effectful calls were returned from hooks or passed into hooks. This corresponds to similar issues for GlobalMutations, because the effectful call work uses the same FunctionEffect infra. This fixes the infra to allow GlobalMutation function effects in return and throw terminals and in all hook arguments.


[ghstack-poisoned]
Copy link
Contributor

@josephsavona josephsavona left a comment

Choose a reason for hiding this comment

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

nice

@mvitousek mvitousek merged commit 38ddcbe into gh/mvitousek/20/base Aug 2, 2024
19 checks passed
mvitousek added a commit that referenced this pull request Aug 2, 2024
… and in return values

ghstack-source-id: f9ea675ead6eb61b3afc2a3deace0da270612d9d
Pull Request resolved: #30576
@mvitousek mvitousek deleted the gh/mvitousek/20/head branch August 2, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants