Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/razor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 284b32d1cd
Choose a base ref
...
head repository: dotnet/razor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1373cc552f
Choose a head ref
  • 8 commits
  • 21 files changed
  • 2 contributors

Commits on Mar 13, 2025

  1. 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.
    DustinCampbell committed Mar 13, 2025
    Configuration menu
    Copy the full SHA
    3a0d65c View commit details
    Browse the repository at this point in the history
  2. 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.
    DustinCampbell committed Mar 13, 2025
    Configuration menu
    Copy the full SHA
    ef4a827 View commit details
    Browse the repository at this point in the history
  3. 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.
    DustinCampbell committed Mar 13, 2025
    Configuration menu
    Copy the full SHA
    b533363 View commit details
    Browse the repository at this point in the history
  4. 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.
    DustinCampbell committed Mar 13, 2025
    Configuration menu
    Copy the full SHA
    4a33dc1 View commit details
    Browse the repository at this point in the history
  5. 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.
    DustinCampbell committed Mar 13, 2025
    Configuration menu
    Copy the full SHA
    09542f8 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2025

  1. Configuration menu
    Copy the full SHA
    dd19ee4 View commit details
    Browse the repository at this point in the history
  2. 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
    DustinCampbell authored Mar 14, 2025
    Configuration menu
    Copy the full SHA
    8cdb5f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1373cc5 View commit details
    Browse the repository at this point in the history
Loading