Skip to content

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

Merged
davidwengier merged 2 commits intomainfrom
dev/dawengie/FixCodeActions
Nov 4, 2024
Merged

Fix code actions (and code actions integration tests)#11141
davidwengier merged 2 commits intomainfrom
dev/dawengie/FixCodeActions

Conversation

@davidwengier
Copy link
Member

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