-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Stale errors for a few minutes after switching branches #44066
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
Comments
@OliverJAsh The branch is no longer available. Are you still seeing the issue. If yes can you please provide the steps to repro |
@sheetalkamat Sorry about that, I've pushed the branch again. |
@OliverJAsh thank you for the repro. While investigating this the root cause of this is that we poll 32 files at a time every 2 seconds. Since your project has 2000+ files being watched it takes a while for it to show up. At this point this looks working as intended. |
Is there anything that could be done to improve the user experience? It seems quite extreme to wait this long for TS to fully update. To workaround this I have to restart the TS server very often. Note that if I add these VS Code settings the issue disappears, i.e. there are no stale errors when I switch branch: "typescript.tsserver.watchOptions": {
"watchFile": "useFsEvents",
"watchDirectory": "useFsEvents"
}, Perhaps this should be the default? |
I am trying to fix some of the issues with using file system watching since they are not reliable. After fix for #47466 , we could consider that but after we have tried it out. Eg. linux has some limit on number of file system watchers it can create.. Then there is non reliability because of watching inode.. though fix for #47466 will make it better but we will have to see how the experience is with that one. |
In that case should we keep this issue open to track the user experience issue? |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I understand this is working as intended but I think there is still a usability issue here. Can we re-open this to track that? |
@sheetalkamat I just tested this again using TS 4.8 which includes #48997, the fix for #47466 which is mentioned above. Unfortunately the issue persists—it still takes 2 minutes for the stale errors to disappear. Do you think we could re-open this issue and discuss ways to improve the user experience? As I mentioned above, if I add these VS Code settings the issue disappears, i.e. there are no stale errors when I switch branch. Do you think we could consider making these settings the default now that #47466 has been addresssed? "typescript.tsserver.watchOptions": {
"watchFile": "useFsEvents",
"watchDirectory": "useFsEvents"
}, Let me know if you need an updated repro that uses TS 4.8. |
4.8 fix was more towards linux which was one of the blocker to make
|
Bug Report
🔎 Search Terms
performance vs code stale error switch branches git
🕗 Version & Regression Information
💻 Code
Video demonstration: https://www.loom.com/share/b8accd596ea74f16ae41f524e6e1497f
TS server log: tsserver.log
typescript-stale-errors-a
. This is a private repository but I believe some members of the TS team already have access from debugging previous issues. If you don't have access, please send me your email address so I can provide access (TS team members only).yarn
app/routes/Users/components/UserStatsSubRoute/UserStatsSubRoute.tsx
git checkout typescript-stale-errors-b
🙁 Actual behavior
Stale errors in the open file for about 2 minutes.
🙂 Expected behavior
Related: microsoft/vscode#122928
The text was updated successfully, but these errors were encountered: