-
Notifications
You must be signed in to change notification settings - Fork 199
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
Move RazorWorkspaceListener to AsyncBatchingWorkQueue #10480
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d8b5386
Add more logging
ryzngard b2d5b72
Add try/catch
ryzngard 6020a22
Move AsyncBatchingWorkQueue
ryzngard 29d85e6
Switch RazorWorkspaceListener to AsyncBatchingWorkQueue
ryzngard 521800d
Pass in solution and add more logging
ryzngard 8e1a06b
Remove removal
ryzngard 3c230aa
PR feedback and remove unused class
ryzngard 7ae4edb
Remove distinct
ryzngard 39306ce
Suppress for now
ryzngard 7a4acf2
Correct access modifier
ryzngard d27e778
Fix tests and only do work for projects with dynamic file
ryzngard 8e43a1f
Merge branch 'main' into projectinfo_logging
ryzngard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
...Razor/src/Microsoft.AspNetCore.Razor.ExternalAccess.RoslynWorkspace/TaskDelayScheduler.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little worrisome that we drop project removes on the floor. We definitely watch for deletions of the
project.razor.bin
file in the language server. If a project is deleted from disk, do we leave the language server in a descent state? Or, does that project continue to live there with all of its documents and references, responding to Rename, Component search, completion, etc.?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never handled removing the file, it just stopped the queue. I'm not actually sure what handles cleanup. Since we're working on
_workspace.CurrentSolution
I'm guessing it would be safe to just delete the file when a project is removed?That's new, and maybe it's already done somewhere else? Not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thought:
We could enqueue and update for the removed
ProjectId
and in the ABWQ work method we could clean up the file if it exists and the project is no longer in the solution?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably unnecessary originally, but yeah I was just trying to remove the scheduler. We'd never get any more updates for the project anyway, so could have ignored removes then too.
Not sure I like the idea of removing the file though. I think in VS Code we are more likely to be processing requests before the file is written, so it does serve more like an offline cache, even if it is one that won't be being updated any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree that this is probably OK. I saw all of the red and notice that all it did was get rid of the scheduler before. With #10475 I think VS Code will start reading in
.bin
even sooner, so you're right that VS Code will use it more as a cache.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failures lead to one thing remove did that I didn't notice: we only queue work for items that have been reported with
NotifyDynamicFile
. This PR breaks that. I'm adding remove back to fix