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

fix: don't swallow file changes when a lot of them come in #6075

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Oct 17, 2023

When frameworks perform a build during local dev, they sometimes touch a lot of files at the same time, and chokidar will notify about those. Since we were debouncing them, only one of those file updates came through to the bundling implementation - all others were swallowed. If that means the function file is swallowed, we don't rebuild functions/edge functions when we should.

I thought about removing the debouncing behaviour, but it's useful so we don't perform too many builds (wasting CPU). Instead, I opted for collecting all paths that are changed, and passing the full list down once the debouncer makes the call. This ensures that our build system has all changed files and can correctly determine when to build.

@Skn0tt Skn0tt self-assigned this Oct 17, 2023
@Skn0tt Skn0tt requested a review from a team as a code owner October 17, 2023 10:00
@github-actions
Copy link

github-actions bot commented Oct 17, 2023

📊 Benchmark results

Comparing with f7518f9

  • Dependency count: 1,655 (no change)
  • Package size: 480 MB ⬆️ 0.00% increase vs. f7518f9

@Skn0tt Skn0tt requested a review from a team October 17, 2023 10:17
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

I can confirm that this fixes the remix issue!

@Skn0tt Skn0tt enabled auto-merge (squash) October 20, 2023 07:43
@Skn0tt Skn0tt merged commit 20d6fef into main Oct 20, 2023
63 checks passed
@Skn0tt Skn0tt deleted the fix-framework-file-watching branch October 20, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants