Skip to content

Forward non-source file change notifications - #14742

Draft
Sean McManus (sean-mcmanus) wants to merge 1 commit into
mainfrom
seanmcm/devbox2-wsl/agent145/watch-embed-resources
Draft

Forward non-source file change notifications#14742
Sean McManus (sean-mcmanus) wants to merge 1 commit into
mainfrom
seanmcm/devbox2-wsl/agent145/watch-embed-resources

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

Summary

Forward recent file-change notifications for non-source files to the language service so it can invalidate translation units that depend on resources such as C23/C++26 #embed payloads. The language service determines whether each file is relevant, while the existing modification-time suppression continues to avoid duplicate notifications.

This PR was investigated and created by GitHub Copilot (in VS Code). Any message starting with ✨Copilot: was sent by Copilot.

Validation

  • Compiled the extension.
  • Ran the extension lint checks.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unconditional synchronous file stats can block the extension host and fail when transient files disappear.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Forwards non-source file changes so the language service can invalidate translation units using resources such as #embed payloads.

Changes:

  • Removes source-file filtering from change notifications.
  • Retains modification-time suppression and editor configuration invalidation.
File summaries
File Description
Extension/src/LanguageServer/client.ts Forwards recent changes for all workspace files.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

// VS Code has a bug that causes onDidChange events to happen to files that aren't changed,
// which causes a large backlog of file notifications to accumulate.
// We workaround this via only sending the change message if the modified time is within 10 seconds.
const mtime: Date = fs.statSync(uri.fsPath).mtime;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

2 participants