Skip to content

Intercept C# semantic tokens refresh messages#6298

Merged
allisonchou merged 25 commits intomainfrom
allichou/InterceptSemanticTokens
Apr 27, 2022
Merged

Intercept C# semantic tokens refresh messages#6298
allisonchou merged 25 commits intomainfrom
allichou/InterceptSemanticTokens

Conversation

@allisonchou
Copy link
Copy Markdown
Contributor

Summary of the changes

Copy link
Copy Markdown
Contributor

@ryanbrandenburg ryanbrandenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

var documentOptions = await GetDocumentOptionsAsync(context).ConfigureAwait(false);

// Ask C# for formatting changes.
var indentationOptions = new RazorIndentationOptions(
Copy link
Copy Markdown
Contributor Author

@allisonchou allisonchou Apr 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 His PR might depend on un-merged Razor EA changes in Roslyn.

Copy link
Copy Markdown

@NTaylorMullen NTaylorMullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have one big race, but we're getting so close!!!

Copy link
Copy Markdown

@NTaylorMullen NTaylorMullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: !

@allisonchou allisonchou added the auto-merge Squash merge once all PR checks are complete and reviewers have approved label Apr 26, 2022
@ghost
Copy link
Copy Markdown

ghost commented Apr 26, 2022

Hello @allisonchou!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@allisonchou
Copy link
Copy Markdown
Contributor Author

allisonchou commented Apr 27, 2022

@ryanbrandenburg it looks like integration tests are hanging, any ideas? Could this be related to the Roslyn package upgrade?
edit: found the logs, investigating

@NTaylorMullen
Copy link
Copy Markdown

@ryanbrandenburg it looks like integration tests are hanging, any ideas? Could this be related to the Roslyn package upgrade? edit: found the logs, investigating

Try rebasing on main to get this fix: #6322

Copy link
Copy Markdown
Contributor

@ryanbrandenburg ryanbrandenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a good cache. Perhaps some day it will be needed again.

@ryanbrandenburg
Copy link
Copy Markdown
Contributor

any ideas

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.

@NTaylorMullen
Copy link
Copy Markdown

any ideas

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

@allisonchou allisonchou merged commit 751db1e into main Apr 27, 2022
@allisonchou allisonchou deleted the allichou/InterceptSemanticTokens branch April 27, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Squash merge once all PR checks are complete and reviewers have approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants