0

fix: Some file watching related vfs fixes by Veykril · Pull Request #16913 · rus...

 4 weeks ago
source link: https://github.com/rust-lang/rust-analyzer/pull/16913
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Member

Fixes #15554, additionally it seems that client side file watching was broken on windows this entire time, this PR switches DidChangeWatchedFilesRegistrationOptions to use relative glob patterns which do work on windows in VSCode.

rustbot

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label

Mar 21, 2024

Member

Huh, it works for me 😛.

Member

Author

Inbefore their file watcher works differently well between linux and windows

lnicola reacted with laugh emoji

Member

Author

Okay so VSCode just does not send a workspace/didChangeWatchedFiles notification when a file gets created even if it matches the glob pattern ... which I guess makes sense if you snapshot all existing files when we tell it what to watch? But at the same time, when will it ever send a created notification then ...?

Member

Author

And no, this does not work for me whatsoever. Running cargo add yields no events from VSCode even 😕

Member

WDYM?

$ touch src/foo.rs # =>

[Trace - 9:57:23 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {
    "changes": [
        {
            "uri": "file:///Projects/hello/src/foo.rs",
            "type": 1
        },
        {
            "uri": "file:///Projects/hello/src/foo.rs",
            "type": 1
        }
    ]
}

Member

Author

I don't get any such events from vscode :)

Member

Sounds like file watching is completely broken on Windows?

Member

Author

Looks like it, tried it on my linux machine quickly and there touching does sent an event. Though I am surprised no one seems to have reported this so far

Member

Author

Huh, switching over to using relative patterns makes it work! That's weird.

Member

Author

@bors r+

Collaborator

📌 Commit fe28e47 has been approved by Veykril

It is now in the queue for this repository.

Collaborator

⌛ Testing commit fe28e47 with merge 7ef7f44...

Collaborator

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 7ef7f44 to master...

bors

merged commit 7ef7f44 into

rust-lang:master

Mar 21, 2024

11 checks passed

Veykril

deleted the client-watched-files branch

March 22, 2024 06:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects

None yet

Milestone

No milestone

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK