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

Fix code actions (and code actions integration tests) #11141

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

davidwengier
Copy link
Contributor

@davidwengier davidwengier commented Nov 3, 2024

My bad. In #11135 I failed to notice that the GenerateRazorCodeActionContextAsync also modified the original code actions request, to handle an oddity of VS LSP, where it sends the users selected range (or cursor position) as a different property, and uses the Range property as the whole line.

We were running most of them twice. Very confusing when you expect one test failure, but get two.
@davidwengier davidwengier requested a review from a team as a code owner November 3, 2024 03:56
davidwengier added a commit to davidwengier/razor that referenced this pull request Nov 4, 2024

namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions;

public abstract class CodeActionEndToEndTestBase(ITestOutputHelper testOutput) : SingleServerDelegatingEndpointTestBase(testOutput)
Copy link
Contributor

Choose a reason for hiding this comment

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

CodeActionEndToEndTestBase

You just recommended I change from XXXBase to AbstractXXX? Shouldn't we be consistent everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did mention that we weren't consistent, and one of the ways we're not is that in product code we mostly use AbstractXXX and in tests we use XXXBase. I have no idea how we came to this state, and I am not trying to pick a side, but this naming convention seemed to fit best with where the change is.

Copy link
Contributor

@alexgav alexgav left a comment

Choose a reason for hiding this comment

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

:shipit:

@davidwengier davidwengier merged commit b7186c4 into main Nov 4, 2024
17 checks passed
@davidwengier davidwengier deleted the dev/dawengie/FixCodeActions branch November 4, 2024 21:25
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 4, 2024
davidwengier added a commit that referenced this pull request Nov 7, 2024
Fixes #10742
Needs dotnet/roslyn#75711 before it will build
Also will need to merge in main once
#11141 is merged
@jjonescz jjonescz modified the milestones: Next, 17.13 P2 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants