Now that razor is on .NET 9 arcade, it can switch over to the new control schema. For this repo, this is roughly:
- DotNetBuildFromSource -> DotNetBuildSourceOnly - Building a source-only build.
- DotnetBuildFromSourceFlavor == Product -> DotNetBuildOrchestrator == true - Building in the VMR, could be source-only or MS's build.
- ArcadeBuildFromSource -> DotNetBuildRepo == true -> Indicates an outer repo build.
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
From Version 9.0.0-beta.24429.5 -> To Version 9.0.0-beta.24453.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/arcade build 20240829.3
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
From Version 9.0.0-beta.24426.3 -> To Version 9.0.0-beta.24429.3
* Update dependencies from https://github.com/dotnet/arcade build 20240829.5
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
From Version 9.0.0-beta.24429.3 -> To Version 9.0.0-beta.24429.5
* Failed to perform coherency update for one or more dependencies.
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Factoring out AutoInsertService
* Switch non-cohost endpoint to use new AutoInsertService
* Adding Remote and OOB AutoInsertService classes and OnAutoInsertProviders
* Add common code for capabilities
* Add cohost OnAutoInsert endpoint
* Parameter rename
* Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInsert/AutoClosingTagOnAutoInsertProvider.cs
Co-authored-by: David Wengier <david.wengier@microsoft.com>
* Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInsert/IAutoInsertService.cs
Co-authored-by: David Wengier <david.wengier@microsoft.com>
* Update src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/AutoInsert/InsertTextEdit.cs
Co-authored-by: David Wengier <david.wengier@microsoft.com>
* Fixup after rebase
* More post-build cleanup
* Move common HTML and C# auto-insert trigger chars per CR suggestion
* More cleanup after rebase
* Add IOnAutoInsertTiggerCharacterProvider per CR suggestion
* Removing trigger characters property from RemoteAutoInsertService per CR suggestion
* Switch to using RemoteResponse
* Fixup bad resolve after rebase, and extra whitespace in RazorLangaugeServer
* Complete capabilities check in CohostingOnAutoInsertEndpoing registration
* Change input position type to serializable :LinePosition
* Fixing RemoteInsertTextEdit to use properly annotated (for serialization) types only
* Support for delegating auto-insert to C#
* Fixup after rebase
* Fixup AutoClosingTagOnAutoInsertProviderTest tests
* Fixinfg up CloseTextTagOnAutoInsertProviderTest tests
* Fixing up OnAutoInsertEndpointTest (which also tests the new AutoInsertService)
* Fixing duplicate OnAutoInsert handler registration (bad merge after rebate)
* Fixes to MEF composition issue and capabilities check
- IDocumentMappingService was not needed (and not available via MEF), so removed that
- TextDocument does not implmement VSInternalTextDocumentClientCapabilities
* Fixing incorrect export type
* Minor cleanup per CR suggestions
* Switching parameters to RazorCodeDocument and removing async in a lot of places per CR suggestion
* Fixing build - removing unneeded using
* Fix RemoteAutoInsertService logic to follow existing code (always prefer our own AutoInsertService first)
* Check allowed trigger characters before delegating to other languages/servers
* Plumbing through actual option values we need and using them
* Fixup After Rebase
* Consuming RazorFormattingService in remote OnAutoInsert service
* Fixing exception in RemoteProjectSnapshot.Configuration
Moving GetFormatterCodeDocumentAsync() into IDocumentSnapshot (and implementations of that) to allow eaiser differentiation of behavior in remote (cohosting) case where we don't need to check the flag on Project.Configuration.
Also AddUsingStatementsIfNeeded *always* gets called, even in cases when they are not actually needed, so we can't Debug.Fail there.
* Switch to PreferHtmlInAttributeValuesDocumentPositionInfoStrategy as the original code does
That allows the code insert double-quotes by delegating to HTML language server after attribute name and equals.
* Cleanup usings
* More usings cleanup
* PR feedback - minor cleanup and removal of InsertTextEdit type in favor of VSInternalDocumentOnAutoInsertResponseItem
* PR feedback - removing MEF usage from RemoteAdhocWorkspaceFactory, minor cleanup
* PR feedback
* Type and method renames, minor cleanup per PR feedback
* Renaming interface methods, removing unnecessary usage of FrozenSet
* Use ImmutableArray to store providers
* Switching to bool and out on IAutoInsertService and implementation
* Cleaned up document position info calculation per PR feedback
* Minor cleanup in RemoteAutoInsertService
* Cleanup trigger character calculation in CohostOnAutoInsertEndpoint
* Formatting changes, VsLspFactory usage
* Revert to MEF DI in RemoteAdhocWorkspaceFactory/RemoteRazorFormattingService
* Removing Rolsyn to VS LSP extension methods
* Switch to raw strings in tests and minor whitespace cleanup
* Rename per PR feedback suggestion to better indicate the purpose
* Cleanup formatting code document acquisition per PR feedback
Creating IFormattingCodeDocumentProvider service with seprate LSP and Remote implementations to provide code document appropriate for formatting.
* Removing redundant assert as compiler is already doing the check
* Unnecessary assignment cleanup
* Misc PR feedback cleanup
* Made GetGeneratedOutputAsync an extension method per PR feedback
* Remaining MEF parameter attrivute formatting changes
* Last of the PR feedback.
* Fixing most unit test failures.
Extension methods can't be used for Mock setups, so since I made GetGeneratedOutputAsync() with no parameter an extension method, I had to switch unit tests to use GeGeneratedOutputAsync(It.Any<bool>())
* Fixing last 4 unit test failures
We still had non-parameter GetGeneratedOutputAsycnc in DocumentSnapshot (even though it wasn't in IDocumentSnapshot) which was getting called internally. That was both messy (since there is now no-parameter extension method on IDocumentSnapshot) and was causing issues in tests
---------
Co-authored-by: David Wengier <david.wengier@microsoft.com>
Coherency update: Failed to perform coherency update for one or more
dependencies. Please review the GitHub checks or run `darc
update-dependencies --coherency-only` locally against
darc-main-a20bf2b8-a79a-4f26-a141-1afa2bfa58d0 for more information.
[marker]: <> (Begin:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
## From https://github.com/dotnet/arcade
- **Subscription**: 2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d
- **Build**: 20240826.3
- **Date Produced**: August 26, 2024 5:01:25 PM UTC
- **Commit**: e3bdd9a0f2a65fe037ba1adb2261eea48a840fa4
- **Branch**: refs/heads/main
[DependencyUpdate]: <> (Begin)
- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
9.0.0-beta.24423.2 to 9.0.0-beta.24426.3][1]
- **Microsoft.DotNet.Arcade.Sdk**: [from 9.0.0-beta.24423.2 to
9.0.0-beta.24426.3][1]
[1]: 9159926865...e3bdd9a0f2
[DependencyUpdate]: <> (End)
[marker]: <> (End:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
Part of https://github.com/dotnet/razor/issues/9519
Needs https://github.com/dotnet/roslyn/pull/74548 before it will compile
Needs
https://devdiv.visualstudio.com/DevDiv/_git/VSLanguageServerClient/pullrequest/567229
before it will work in VS
There were a few side quests on this one:
* Roslyn OOP, at least the way we access it, doesn't have any options
set, so took a few tries to get the Roslyn side of this right for our
needs
* I wrote this feature test-first so only discovered the lack of options
after I modified Roslyn and our test infra to allow us to set global
options, so ended up removing most of that code, Kept the bit about
isolated workspaces because it just makes sense.
* Had to re-write one of the `DocumentMappingService` methods to use
`TextChange` instead of `TextEdit` so I could use Roslyn LSP types
* The hacky, and fortunately temporary, way we were doing generated C#
content was causing cache misses in Roslyn in tests, so fixed that up
* When I finally got up to manual testing I found a bug in the platform
that meant inlay hints just don't work with dynamic registration, so
filed the above linked PR to fix that
If reviewing commit-at-a-time please note that the first commit was
written before the reworking of extension methods and LSP types, and the
fixes for that are in the last commit.