Skip to content

Handle delayed or missed watches for project updates #59625

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

Merged
merged 3 commits into from
Aug 14, 2024
Merged

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Aug 13, 2024

This has two things:

  • We invoke sourceFileChange when invoking wild card watcher to ensure fileExists status is updated. We do this because sometimes we only get "folder" added and deleted events and not actual file moved events.
  • In our cached directory structure, earlier we were ignoring events for files/folders whose parent didnt have cached entries. but in cases where we are getting say event for "folder/functions/whatever" while creating "functions/whatever", we would not cleanup structure for "folder" and hence it would still assume "functions" does not exist in "folder". This fixes it.

This is kind of continuation of #59418 to deal with debounced watch events in a better way

Fixes repro reported in #59603 (comment)

We invoke sourceFileChange when invoking wild card watcher to ensure fileExists status is updated
When we dont have cached data for file we are adding, we need to clear out data for first cached ancestor
…re invoked later

This is test case from #24547 and fixed in #24816 which was incorrectly updating only fileExists - and not status on the filesystem
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 13, 2024
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving a folder that's imported using a path alias does not update the import paths.
3 participants