fix(lsp): resolve hover on the right side of arrow expressions#3157
Open
ivanauth wants to merge 2 commits into
Open
fix(lsp): resolve hover on the right side of arrow expressions#3157ivanauth wants to merge 2 commits into
ivanauth wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The schema position mapper short-circuited when the cursor sat on the right-hand side of an arrow expression (`.any(member)`, `.all(member)`, or `parent->member`), so editors backed by the LSP server returned no hover and no go-to-definition for arrow RHS identifiers. Replace the short-circuit with proper resolution: look up the LHS relation's allowed direct target types via Definition.AllowedSubjectRelations and find the RHS name on each target namespace, returning all matches when the LHS permits multiple target types. Generator errors from the resolver are propagated rather than swallowed. The downstream relation/permission rendering path is unchanged. Add table-driven coverage for ->, .any, .all, permission resolution, subject-subrelation LHS (group#member), multi-target match behavior, and the no-match negative case, plus a composable-schema test that pins arrow RHS behavior for imported target namespaces.
d909d72 to
9a5624c
Compare
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.
Changes
SchemaPositionMapper.relationReferenceChainwith proper resolution viaDefinition.AllowedSubjectRelations, so hover and go-to-definition work on the right side of.any,.all, and->.Closes #2990