Skip to content

Conversation

@mvitousek
Copy link
Contributor

@mvitousek mvitousek commented Aug 1, 2024

@vercel
Copy link

vercel bot commented Aug 1, 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 9:00am

mvitousek added a commit that referenced this pull request Aug 1, 2024
mvitousek added a commit that referenced this pull request Aug 1, 2024
mvitousek added a commit that referenced this pull request Aug 1, 2024
mvitousek added a commit that referenced this pull request Aug 1, 2024
mvitousek added a commit that referenced this pull request Aug 1, 2024
let usedIdentifiers = new Set<IdentifierId>();
let names = new Map<IdentifierId, string | undefined>();

function visitFunction(fn: HIRFunction): void {
Copy link
Member

Choose a reason for hiding this comment

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

If i'm understanding correctly, this seems like it's redoing part of the analysis of DCE to figure out what's used or not. That logic is pretty tricky, i'm wondering if makes sense for DCE record information on unused instructions or produce a Set of unused values? I don't love that either though, just a thought.

Copy link
Member

@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.

Per offline discussion looks like this has a lot of of false positives, here's one example:

export default function MyApp() {
  const fn = () => {
    sideEffect();
  }
  return useFoo(fn);
}

mvitousek added a commit that referenced this pull request Aug 2, 2024
…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]
mvitousek added a commit that referenced this pull request Aug 2, 2024
@github-actions
Copy link

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Oct 31, 2024
@github-actions
Copy link

github-actions bot commented Nov 7, 2024

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@github-actions github-actions bot closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants