Skip to content

[heft-swc] Reduce set of watched folders - #5295

Merged
David Michon (dmichon-msft) merged 3 commits into
microsoft:mainfrom
dmichon-msft:heft-swc-watch-loop
Aug 4, 2025
Merged

[heft-swc] Reduce set of watched folders#5295
David Michon (dmichon-msft) merged 3 commits into
microsoft:mainfrom
dmichon-msft:heft-swc-watch-loop

Conversation

@dmichon-msft

@dmichon-msft David Michon (dmichon-msft) commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Summary

Updates the watch logic to only watch folders that TypeScript has identified has having wildcard patterns for source files, rather than all folders enumerated during TSConfig parsing.

This avoids, for example, watching for changes to the project root folder.

Details

The TSConfig parser returns a wildcardDirectories object that indicates folders that contained wildcards and if the wildcard is local (* or ?) or recursive (**). This is used to determine the directories that should be watched by Heft's watcher.

How it was tested

Local heft run-watch --only build -- --clean in heft-swc-test and creating/modifying/deleting files at various points in the directory hierarchy.
Linked the new version into a repository that was having infinite loop issues and verified that no such issues occur.

Impacted documentation

None.

@dmichon-msft
David Michon (dmichon-msft) merged commit 4ef999a into microsoft:main Aug 4, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Aug 4, 2025
@dmichon-msft
David Michon (dmichon-msft) deleted the heft-swc-watch-loop branch August 4, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants