Repository navigation
Increase the idle time before which ensureProject for open file is called - #37121
Conversation
…ect printed anytime its structure changes)
|
I think I'm missing something. What's the sequence of operations in the scenario that's causing problems? Guess:
What starts the timer? |
|
The scenario is as follows:
With this change, the timeout at point 8 is delayed so that in most cases it would be after point 8 so that we arent creating inferred project for a.ts |
|
Sheetal Nandi (@sheetalkamat) |
|
(5) Whenever something changes we schedule update for the project and another timer to ensure projects for all open files. So at (5) schedules both. Note that a.ts and b.ts both are received as fileAddedOrRemoved event for configFile's wild card directory watching. Sorry about the confusion in the note. |
|
Oh, I see - after we see the file events, we know a.ts is not on disk but we still believe it's open in the editor (i.e. as an unsaved buffer). That makes sense. |
Andrew Casey (amcasey)
left a comment
There was a problem hiding this comment.
Given that we already have a race and a timeout, I see no harm in making the timeout longer. Doesn't seem to break VS (though it's hard to be certain with races involved).
This helps with rename case since we don't want to create inferred project just before editor sends updateOpen to close open file and open renamed file instead.. (Earlier the timeout ran before this updateOpen request)
As part of this I am also making logs little bit more concise given we print project structure when the structure changes.
So when printing all projects we print project names and its file count and open file and projects they are in.
Helps with #30535 delays