Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use vscode watches for tsserver#193848

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bpasero merged 28 commits intomicrosoft:mainfromsheetalkamat:canUseWatchEvents
Apr 9, 2024

Conversation

@sheetalkamat
Copy link
Member

@bpasero
Copy link
Member

🆒 , is this the change that would enable file watching in all of TS extension with the VS Code file watcher or is there more needed?

@sheetalkamat
Copy link
MemberAuthor

is this the change that would enable file watching in all of TS extension with the VS Code file watcher or is there more needed?

Yesmicrosoft/TypeScript#54662 should redirect all the watch calls by tsserver into vscode if invoked with--canUseWatchEvents

bpasero reacted with thumbs up emoji

@mjbvzmjbvz added this to theOctober 2023 milestoneSep 26, 2023
@bpasero
Copy link
Member

Fyi#194776 landed which enables extensions to do full recursive file watching anywhere even within the workspace with custom exclude rules. It is behind proposed API (createFileSystemWatcher).

@mjbvz
Copy link
Collaborator

@sheetalkamat I pushed a change that gates this feature behind a setting and also tries to clean up file watchers when the server restarts

In my testing, I see errors such as this in the developer tools:

 MainThreadFileSystemEventService#$watch(): failed to stat a resource for file watching (extension: vscode.typescript-language-features, path: file:///Users/matb/projects/node_modules, recursive: true, session: 0.16141590890668556): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '/Users/matb/projects/node_modules'

Will this cause any issues for TypeScript? It seems like we may be trying to watch the contents of a directory that does not exist. Will we still pick up if the directory is created later?

@sheetalkamat
Copy link
MemberAuthor

Will this cause any issues for TypeScript? It seems like we may be trying to watch the contents of a directory that does not exist. Will we still pick up if the directory is created later?

We do need to watch even if directory does not exist and get events when it gets created. (Without this we wouldnt be picking up changes to project resolutions because ofnpm install)
@bpasero is this supported. Are the errors because i am yet to add exclude pattern.

@bpasero
Copy link
Member

@sheetalkamat no, that is not supported. you have to watch a parent folder that exists. Maybe then you will have to watch the workspace folder(s) and do a negated exclude pattern such as!**/node_modules/** to recursively watch any node module folder that is either there already or gets created.

@mjbvzmjbvz modified the milestones:March 2024,April 2024Mar 26, 2024
@kieferrmkieferrm mentioned this pull requestApr 7, 2024
53 tasks
bpasero
bpasero previously approved these changesApr 9, 2024
@bpaserobpaseroenabled auto-merge (squash)April 9, 2024 11:08
@bpaserobpasero merged commitb2c4302 intomicrosoft:mainApr 9, 2024
@sheetalkamatsheetalkamat deleted the canUseWatchEvents branchApril 9, 2024 17:06
@microsoftmicrosoft locked and limited conversation to collaboratorsJun 11, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@bpaserobpaserobpasero approved these changes

@TyriarTyriarTyriar approved these changes

Assignees

@bpaserobpasero

@mjbvzmjbvz

Labels

None yet

Projects

None yet

Milestone

April 2024

Development

Successfully merging this pull request may close these issues.

4 participants

@sheetalkamat@bpasero@mjbvz@Tyriar

[8]ページ先頭

©2009-2025 Movatter.jp