-
Notifications
You must be signed in to change notification settings - Fork 238
Comparing changes
Open a pull request
base repository: dotnet/razor
base: 284b32d1cd
head repository: dotnet/razor
compare: 1373cc552f
- 8 commits
- 21 files changed
- 2 contributors
Commits on Mar 13, 2025
-
Make C# completion list rewriting synchronous
C# completion list is currently split across three "rewriter" objects that are async. However, none of them need to be async if they're passed a RazorCodeDocument. So, this change acquires a RazorCodeDocument up front before calling the rewriters. With this in place, the rewriters can be synchronous.
Configuration menu - View commit details
-
Copy full SHA for 3a0d65c - Browse repository at this point
Copy the full SHA 3a0d65cView commit details -
Make RewriteCSharpResponseAsync synchronously
Now the completion list rewriters are synchronous, the RazorCodeDocument can be acquired by callers of RewriteCSharpResponseAsync and passed to it. Then, RewriteCSharpResponseAsync can be made synchronous.
Configuration menu - View commit details
-
Copy full SHA for ef4a827 - Browse repository at this point
Copy the full SHA ef4a827View commit details -
Make TryGetProvisionalCompletionInfoAsync synchronous
The only reason this method was async was to call the IDocumentMappingService extension method, GetPositionInfoAsync. However, the reason *that* extension method is async is to call GetCodeDocumentAsync(). Ultimately, this method can be made synchronous by passing RazorCodeDocument to it.
Configuration menu - View commit details
-
Copy full SHA for b533363 - Browse repository at this point
Copy the full SHA b533363View commit details -
Remove IDocumentMappingService.GetPositionInfoAsync extension method
This method is async just to call DocumentContext.GetCodeDocumentAsync and the only caller has a RazorCodeDocument in hand. So, this method can be removed in favor of the synchronous version.
Configuration menu - View commit details
-
Copy full SHA for 4a33dc1 - Browse repository at this point
Copy the full SHA 4a33dc1View commit details -
Audit GetCompletionListAsync methods
This change audits and refactors to the GetCompletionListAsync methods on CompletionListProvider, RazorCompletionListProvider and DelegatedCompletionListProvider in favor of removing async state machines where possible.
Configuration menu - View commit details
-
Copy full SHA for 09542f8 - Browse repository at this point
Copy the full SHA 09542f8View commit details
Commits on Mar 14, 2025
-
Configuration menu - View commit details
-
Copy full SHA for dd19ee4 - Browse repository at this point
Copy the full SHA dd19ee4View commit details -
Remove excess async state machines in completion (#11620)
A lot of the code to compute completion lists is asynchronous in order to call `DocumentContext.GetCodeDocumentAsync(...)`. However, many of these calls can be made synchronous if the `RazorCodeDocument` is computed up front and passed in. In addition, I've updated some methods that have both synchronous and asynchronous paths to return `ValueTask`. I hope that I don't conflict too badly with @davidwengier's completion work. CI Build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2662887&view=results Test Insertion: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/619102
Configuration menu - View commit details
-
Copy full SHA for 8cdb5f9 - Browse repository at this point
Copy the full SHA 8cdb5f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1373cc5 - Browse repository at this point
Copy the full SHA 1373cc5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 284b32d1cd...1373cc552f