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] Special-case phi inference for mixed readonly type #30797

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

josephsavona
Copy link
Contributor

@josephsavona josephsavona commented Aug 23, 2024

Stack from ghstack (oldest at bottom):

This allows us to handle common operations such as useFragment(...).edges.nodes ?? [] where we have a Phi(MixedReadonly, Array). The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

[ghstack-poisoned]
Copy link

vercel bot commented Aug 23, 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 23, 2024 0:53am

josephsavona added a commit that referenced this pull request Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

ghstack-source-id: d99442d5c5bb4d1a2b7b5e0269c2d6fad0ed0c74
Pull Request resolved: #30797
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Aug 23, 2024
…ype"

This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

[ghstack-poisoned]
josephsavona added a commit that referenced this pull request Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

ghstack-source-id: 27c9465ca6648c7b8ac7f08f81ba38b91c22bc97
Pull Request resolved: #30797
…ype"

This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

[ghstack-poisoned]
josephsavona added a commit that referenced this pull request Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

ghstack-source-id: 51283108942002a14d032613a9d0b8b665ee3a94
Pull Request resolved: #30797
@josephsavona josephsavona merged commit 08adeb3 into gh/josephsavona/45/base Aug 23, 2024
19 checks passed
josephsavona added a commit that referenced this pull request Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.

ghstack-source-id: 51283108942002a14d032613a9d0b8b665ee3a94
Pull Request resolved: #30797
@josephsavona josephsavona deleted the gh/josephsavona/45/head branch August 23, 2024 22:25
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.

3 participants