Skip to content
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

Re-architect formatting to prepare for cohosting (and for fun!) #10778

Merged
merged 28 commits into from
Aug 30, 2024

Commits on Aug 21, 2024

  1. Move add usings helper code down to the workspaces layer

    This commit is just moves, no functionality changes. Minor tweaks to method visibility, and one rename of a static field :)
    davidwengier committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    97ac536 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8984db9 View commit details
    Browse the repository at this point in the history
  3. Rename some methods

    davidwengier committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    fba3f1e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2c39c20 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e45f094 View commit details
    Browse the repository at this point in the history
  6. Be SUPER specific about our APIs, what they accept, and what they return

    This probably looks like overkill, but hopefully the next commit will help explain a little about what is going on.
    davidwengier committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    a702716 View commit details
    Browse the repository at this point in the history
  7. Pass Html edits into the formatting service, so that the service does…

    …n't need LSP client dependencies
    davidwengier committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    e56b85e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3f57810 View commit details
    Browse the repository at this point in the history
  9. Minor cleanup

    davidwengier committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    38868db View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ca142be View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1143900 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. One last minor cleanup

    davidwengier committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    2165fcb View commit details
    Browse the repository at this point in the history
  2. Be explicit about formatting passes

    Always felt like a huge potential bug farm. eg, if Html ended up not being first we'd have bugs, working out the Order property (which was weirdly backwards?) was a pain, and the entire formatting engine produces horrible results if the ordering changes anyway.
    davidwengier committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    d635754 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e12117 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6f1c6ef View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f74150d View commit details
    Browse the repository at this point in the history
  6. Separate out the files in the Html formatter passes.

    Doing this separately, and purely mechanically, so make review easier
    davidwengier committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    ef44f4f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    45b8495 View commit details
    Browse the repository at this point in the history
  8. Remove Kind property from FormattingResult

    This was only used for validation as edits pass through the pipeline, but since we now tightly control the pipeline its unnecessary
    davidwengier committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    5caa48f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fa4e8ef View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Simple PR feedback

    davidwengier committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    587e72a View commit details
    Browse the repository at this point in the history
  2. Missed the readonly bit

    davidwengier committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    6622a0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b79428 View commit details
    Browse the repository at this point in the history
  4. More PR feedback

    davidwengier committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    2157169 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. PR feedback

    davidwengier committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    19134c2 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Remove stale TODO

    davidwengier committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    1de43a0 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Merge remote-tracking branch 'upstream/main' into FormattingLayering

    # Conflicts:
    #	src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs
    #	src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/AutoInsert/OnAutoInsertEndpoint.cs
    #	src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Formatting/HtmlFormatter.cs
    #	src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/InlineCompletion/InlineCompletionEndPoint.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/FormattingContext.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/IRazorFormattingService.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpFormattingPass.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/FormattingContentValidationPass.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/FormattingDiagnosticValidationPass.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/HtmlFormattingPassBase.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/RazorFormattingService.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Formatting/RemoteCSharpOnTypeFormattingPass.cs
    #	src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Formatting/RemoteRazorFormattingPass.cs
    #	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/RazorOnAutoInsertProviderTestBase.cs
    #	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Completion/Delegation/DelegatedCompletionItemResolverTest.NetFx.cs
    #	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingLanguageServerTestBase.cs
    #	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/FormattingTestBase.cs
    #	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx/TestRazorFormattingService.cs
    davidwengier committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    d0e2a57 View commit details
    Browse the repository at this point in the history
  2. Fixes after merge

    davidwengier committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    ee83a6b View commit details
    Browse the repository at this point in the history