Repository navigation
Exclude build output and temporary files from app dev watchers - #8993
Merged
Merged
Conversation
Limit Cargo output ignores to Rust function roots so source files and imports under similarly named paths remain watched. Co-authored-by: River <river@shopify.com>
Contributor
|
/snapit |
1 of 4 tasks
Contributor
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261023095012Caution After installing, validate the version by running |
gonzaloriestra
approved these changes
Oct 23, 2026
gonzaloriestra
left a comment
Contributor
There was a problem hiding this comment.
Tophatted and confirmed that it fixes the original issue 👌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Related to https://community.shopify.dev/t/high-cpu-due-to-file-watcher-for-app-dev-command/38774/4
app devtraverses Cargo build output, Function output directories, and CLI temporary files before it filters file events. This creates unnecessary file watchers and polling work.WHAT is this pull request doing?
Exclude complete Cargo
targetdirectories when their parent containsCargo.toml, Function output directories,.shopifyfiles, Finder metadata, and editor temporary files before Chokidar traverses them. Other source and imported files intarget,dist, andgeneratedremain watched.Refresh Function output rules when the app reloads, without restarting the watcher. Real-watcher tests use bounded readiness checks and guaranteed cleanup.
Validation: 51 app-event tests, a separate polling-mode probe, app type checking, and changed-file lint passed. The reload regression fails with the old matcher.
How to manually test your changes?
pnpm shopify app dev --path <app>for an app with a Rust Function and a UI extension. Edit Rust source and confirm that the Function rebuilds.pnpm shopify app generate extension --path <app>. Edit its source and confirm that it builds.target/release,dist, orgenerateddirectory outside the extension. Edit that module and confirm that the extension rebuilds.Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add