Skip to content

Fix type hierarchy request test compilation - #85253

Merged
JoeRobich merged 1 commit into
mainfrom
copilot/fix-type-hierarchy-lsp-params
Sep 10, 2026
Merged

Fix type hierarchy request test compilation#85253
JoeRobich merged 1 commit into
mainfrom
copilot/fix-type-hierarchy-lsp-params

Conversation

@JoeRobich

@JoeRobich JoeRobich commented Sep 10, 2026

Copy link
Copy Markdown
Member

Fixes the test compilation failures introduced by #82294.

TypeHierarchySupertypesParams and TypeHierarchySubtypesParams no longer inherit TextDocumentPositionParams under the LSP 3.18 model. Remove the stale TextDocument and Position assignments from the Language Server and Razor test requests; the handlers resolve the document from Item.Data.

Validation:

  • dotnet test src/LanguageServer/ProtocolUnitTests/Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests.csproj -f net10.0 --filter 'FullyQualifiedName~TypeHierarchyTests' -p:RunAnalyzersDuringBuild=true --no-restore
  • dotnet test src/Razor/src/Razor/test/Microsoft.VisualStudioCode.RazorExtension.UnitTests/Microsoft.VisualStudioCode.RazorExtension.UnitTests.csproj --filter 'FullyQualifiedName~CohostTypeHierarchyEndpointTest' -p:RunAnalyzersDuringBuild=true --no-restore

The net472 build could not be run locally on macOS because the .NET Framework 4.7.2 targeting pack is unavailable; CI covers that target.

Microsoft Reviewers: Open in CodeFlow

Remove properties that are no longer part of the subtype and supertype request models after the LSP 3.18 protocol update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5eafba01-dc3d-4db4-8343-3cc70b399bba
Copilot AI lite review requested due to automatic review settings September 10, 2026 20:19
@JoeRobich
JoeRobich requested review from a team as code owners September 10, 2026 20:19
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No blocking issues were identified in the reviewed changes.

Review tier: Lite
Findings: None

What changed in this PR

Fixes type hierarchy test compilation for the LSP 3.18 request model.

Changes:

  • Removes obsolete TextDocument and Position assignments.
  • Preserves document resolution through Item.Data.
File Summary
src/​Razor/​src/​Razor/​test/​Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests/​Endpoints/​CohostTypeHierarchyEndpointTest.cs Updates Razor type hierarchy requests.
src/​LanguageServer/​ProtocolUnitTests/​TypeHierarchy/​TypeHierarchyTests.cs Updates language server type hierarchy requests.

@JoeRobich
JoeRobich enabled auto-merge (squash) September 10, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants