-
Notifications
You must be signed in to change notification settings - Fork 196
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
Cohost Razor and Roslyn to better share object types and object instances #9519
Comments
ghost
added
the
untriaged
label
Nov 1, 2023
ghost
removed
the
untriaged
label
Nov 2, 2023
davidwengier
added a commit
that referenced
this issue
Jan 4, 2024
First part of #9519 Razor side of dotnet/roslyn#70819 This PR consumes the new Cohost server from Roslyn, and when enabled, moves DocumentColor requests from being handled by our existing Razor Language Server, to instead be handled by the new server. There is currently no sharing of project system data or anything like that yet. A few TODOs for follow ups, ~can't be merged, and indeed won't build, until a Roslyn package is available etc. but~ it's reviewable while we keep working, and more important its shippable in its "off" state. ~Ignore the last commit, obviously won't be merged :)~
davidwengier
added a commit
that referenced
this issue
Jan 5, 2024
This was referenced Jan 24, 2024
davidwengier
added a commit
that referenced
this issue
Jan 26, 2024
…9831) Part of #9519 Right now code generation, in co-hosting and non, comes from document snapshots in the Razor project system which directly call the Razor compiler. This change means that all Html and C# code generation in co-hosting is done based on the TextDocument, which means it will come from the source generator when that part is ready. This is the Razor side of, and needs a Roslyn bump to, dotnet/roslyn#71671
davidwengier
added a commit
that referenced
this issue
Jan 30, 2024
Part of #9519 As per our meeting the other day, there are a few things on `IProjectSnapshot` that are problematic. This PR resolves all of the issues in one of two ways: * For `Configuration`, `GetProjectEngine()` and `ProjectWorkspaceState` the cohost implementations now simply throw * There was some usage of these inside cohosting, because it re-used methods on `DocumentState` to do jobs that the source gen will eventually take over. To make this clearer, I modified the helper methods so they took the underlying data, rather than pulling it from `IProjectSnapshot` directly * Changes the `TagHelpers` property into a `GetTagHelpersAsync(CancellationToken)` method * Because of the virality of async, I recommend reviewing this PR commit-at-a-time, just so this last commit is seen separately, for your sanity. * There were only two places where moving to async would have been very very annoying, so I added a `GetTagHelpersSynchronously()` extension method that validates that its not called from cohosting. It's only called from legacy editor code. Note that this isn't the proposed solution in the aforementioned meeting, that change can still come later. I was hoping to take that idea and use DI to enforce something better than just a runtime check, but it turned out that wasn't possible because some MEF services need these properties in non-cohosting. This PR at least introduces the runtime check, so we can continue moving forward. Integration tests are running and should show up in in the checks list.
9 tasks
This was referenced Feb 16, 2024
Open
Merged
davidwengier
added a commit
that referenced
this issue
Feb 21, 2024
I'm mainly putting this up so @DustinCampbell can tell me what I did wrong :) As part of cohosting we're going to need a lot more things to run in OOP, so its probably best to move away from these hand-constructed services that it has. This PR introduced MEF, in a reasonably unsophisticated way, into the procedure so that services can at least get some things from an `ExportProvider`. Once in that world, obviously everything works as expected with attributes etc. Along the way I also found that our telemetry reporting in OOP wasn't doing anything, so fixed that and moved it to the MEF composition too. Also improved the `launchSettings.json` file a little, and found it was previously in the `.gitignore`. This seemed wrong to me, but maybe @dotnet/razor-compiler will have something different to say about that? I can always move the compiler one back in if necessary. Part of #9519
This was referenced Mar 6, 2024
davidwengier
added a commit
that referenced
this issue
Mar 6, 2024
The next PR that I'm working on for cohosting is getting to be too big to review, but cohosting is in a weird place where we can't really have the old and the new co-existing, so lets start with a clean slate. Part of #9519
davidwengier
added a commit
that referenced
this issue
Jul 17, 2024
Part of #9519 and #10603 This was fairly straight forward too, though adding MVC files to the mix found a bug in our test data, which is kind of humorous. I decided not to copy all of the semantic tokens tests we have, but rather just create something reasonably all-encompassing. The core engine is shared so both sets of tests exercise it anyway.
This was referenced Jul 17, 2024
davidwengier
added a commit
that referenced
this issue
Jul 17, 2024
davidwengier
added a commit
that referenced
this issue
Jul 18, 2024
Part of #9519 and #10603 Requires dotnet/roslyn#74402 Removes a little more dodginess in the cohosting tests by actually using the `RazorPinnedSolutionInfoWrapper` for solution checksums, just like the real OOP services.
davidwengier
added a commit
that referenced
this issue
Jul 19, 2024
Requires dotnet/roslyn#74280, and won't even compile without it. Part of #9519 This brings signature help to Cohosting. It's a pretty simply PR, for a pretty simple endpoint, as we just delegate, and there is no translation of delegated info. The interesting part here is that we use `System.Text.Json` for the remote signature help service, because it makes more sense to take advantage of the existing Json converters for the potential complexity of the `SignatureHelp` result type.
davidwengier
added a commit
that referenced
this issue
Jul 19, 2024
davidwengier
added a commit
that referenced
this issue
Jul 23, 2024
Part of #9519 Brings document highlight to cohosting, including tests. Also added some basic tests for `RazorServices` and `Services.props`.
This was referenced Jul 25, 2024
davidwengier
added a commit
that referenced
this issue
Jul 31, 2024
Part of #9519 Needs dotnet/roslyn#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.
Merged
davidwengier
added a commit
that referenced
this issue
Aug 13, 2024
This was referenced Aug 19, 2024
davidwengier
added a commit
that referenced
this issue
Aug 30, 2024
I nerd sniped myself thinking about how to get formatting into cohosting, given the limitations Alex ran into doing the relayering for auto insert, and this is the result. I was going to go further and port the actual formatting endpoint to cohosting, but that would have ran into the same issue that Alex did with auto insert, so I figured I'd wait for that to merge, and put this up in the meantime. This unblocks the formatting, code action and completion end points from being ported. Part of #10743 Part of #9519 I **strongly** recommend reviewing commit-at-a-time, as I did this deliberately in an order, and in order to (hopefully) make reviewing easier. Though granted, there are a lot of commits.
This was referenced Sep 2, 2024
Merged
Merged
davidwengier
added a commit
that referenced
this issue
Sep 5, 2024
davidwengier
added a commit
that referenced
this issue
Sep 6, 2024
Needs dotnet/roslyn#74978 Fixes #10695 Part of #9519 Pretty straightforward. A tiny bit of code moved to be shared with Go To Def, but that's it.
davidwengier
added a commit
that referenced
this issue
Sep 6, 2024
Needs dotnet/roslyn#74978 Fixes #10746 Part of #9519
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Individual endpoint status: #10364
In no particular order:
#line
directives instead ofISpanMappingService
roslyn#72136#line default
and#line hidden
between consecutive using directives #9991Document
types instead ofTextDocumentIdentifier
types<DefaultRazorFileIdeSupport>false</DefaultRazorFileIdeSupport>
get-out-of-jail-free property that people can specify to disable the behaviour if it causes problemsThe text was updated successfully, but these errors were encountered: