Intercept C# semantic tokens refresh messages#6298
Conversation
...azor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRefreshEndpoint.cs
Outdated
Show resolved
Hide resolved
ryanbrandenburg
left a comment
There was a problem hiding this comment.
Mostly just nits, though the _ = Task stuff concerns me. If there's a specific reason we need it lets go ahead and add an explanation comment about why.
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/RazorSemanticTokensEndpoint.cs
Outdated
Show resolved
Hide resolved
...t.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultRazorSemanticTokensInfoService.cs
Outdated
Show resolved
Hide resolved
...t.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultRazorSemanticTokensInfoService.cs
Outdated
Show resolved
Hide resolved
| var documentOptions = await GetDocumentOptionsAsync(context).ConfigureAwait(false); | ||
|
|
||
| // Ask C# for formatting changes. | ||
| var indentationOptions = new RazorIndentationOptions( |
There was a problem hiding this comment.
@davidwengier would you mind confirming that this change looks correct here? I had to upgrade the Roslyn package version which resulted in one of the overloads being rendered obsolete. I was going to leave it for later, but then the formatting tests started failing so I just attempted to fix it up in this PR😅
There was a problem hiding this comment.
I think if the tests pass then its fine, though @tmat used a different approach for the auto formatting options in https://github.com/dotnet/razor-tooling/pull/6166/files#diff-1fcf96ce7b4faaa3af72db165764d43a107a153f7040dc46169bd4d562f1b173 and got them from the global options service.
I'm not sure how much it matters for razor scenarios, as there isn't a way for anyone to configure the options anyway.
There was a problem hiding this comment.
Thanks! Didn't know Tomas opened a PR. I tried out his changes but was getting some weird casting errors when running the formatting tests. I'm going to take the current approach for now so we can merge this PR, but maybe we can address in a follow up
There was a problem hiding this comment.
👍 His PR might depend on un-merged Razor EA changes in Roslyn.
NTaylorMullen
left a comment
There was a problem hiding this comment.
Have one big race, but we're getting so close!!!
...azor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/SemanticTokensRefreshEndpoint.cs
Outdated
Show resolved
Hide resolved
...t.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultRazorSemanticTokensInfoService.cs
Outdated
Show resolved
Hide resolved
...osoft.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultSemanticTokensCacheService.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/RazorSemanticTokensEndpoint.cs
Outdated
Show resolved
Hide resolved
...t.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultRazorSemanticTokensInfoService.cs
Outdated
Show resolved
Hide resolved
...osoft.AspNetCore.Razor.LanguageServer/Semantic/Services/DefaultSemanticTokensCacheService.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/SemanticTokensCacheService.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/SemanticTokensCacheService.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/MemoryCache.cs
Outdated
Show resolved
Hide resolved
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorCSharpSemanticTokensInterceptor.cs
Outdated
Show resolved
Hide resolved
...azor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Semantic/SemanticTokensCacheTest.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/MemoryCache.cs
Outdated
Show resolved
Hide resolved
|
Hello @allisonchou! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
@ryanbrandenburg it looks like integration tests are hanging, any ideas? Could this be related to the Roslyn package upgrade? |
Try rebasing on main to get this fix: #6322 |
ryanbrandenburg
left a comment
There was a problem hiding this comment.
It was a good cache. Perhaps some day it will be needed again.
Almost certainly a transient issue, retry with the rebase that @NTaylorMullen recommended. I filed #6324 to follow up. Thankfully we were blessed with LogHubs on this issue, so investigation should be relatively simple. |
Also, do we have dump capturing by chance? That'd make it super clear to understand what was hanging |
Summary of the changes
workspace/semanticTokens/refreshnotifications roslyn#60824 before merging.