Fix exact file identity in LSP navigation - #5384
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LSP definition/declaration and reference navigation could select a declaration from a case-colliding indexed file and interpret its position against the requested document. Select local candidates by binary-equal indexed path before SQL limits, and reject foreign paths during position matching. Apply the same exact identity to local reference fallbacks while preserving authoritative cross-file targets and overload behavior.
Reuse the existing audit-partition equality scope, with nested/exception restoration coverage. Regression fixtures cover case collisions without a case-sensitive filesystem, literal glob/SQL path characters, directory-prefix decoys, the 50-candidate boundary, unresolved local fallbacks and cross-file navigation.
Fixes #5373
Validation
cfcb723e5, Release LSP/audit recovery tests plus Honor token-boundary mode in named-query search count summaries #5376: 182 passed on each of net8.0/net9.0.dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false: net8.0 12,617 passed / 9 skipped; net9.0 12,123 passed / 435 skipped; zero failures. Rebase resolution changed only the placement of the bilingual testing-guide additions; the issue's code/test patch is unchanged.B.Leafat line 2, characters 13–17, and its reference at line 8, characters 10–14 (zero-based).dotnet run --project tools/CodeIndex.Changelog -- check.git diff --check.origin/main..HEAD, including a second round after the rebase: no blocking/actionable issues found.Documentation and changelog
USER_GUIDE.md,DEVELOPER_GUIDE.mdandTESTING_GUIDE.md.changelog.d/unreleased/5373.fixed.md.Follow-up