Repository navigation
Propagate explicit roxygen types through calls and S3 dispatch - #896
Merged
Merged
Conversation
This was referenced Nov 26, 2026
eitsupi
approved these changes
Nov 30, 2026
eitsupi
left a comment
Member
There was a problem hiding this comment.
Reviewed by ChatGPT.
No blocking issues found. I have three non-blocking suggestions:
- The
numerictype hint currently resolves todouble, but numeric vectors in R can be either integer or double. Treatingnumericas equivalent tointeger | doublewould better reflect common R documentation conventions and avoid incorrectly selecting an S3 method. - Please consider adding a regression test for the initial completion request when a wrapper's return type is inferred solely from a package-qualified parameter hint, as noted in #894.
- The unrelated backend CLI test fix would be better handled in a separate PR. The native code optimizations could also be separated if they are independently useful.
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.
Part 2 of the review split. The base and review order are in #894.
This builds on the explicit member-completion PR. It follows annotated values through wrappers, reassignment and return paths, resolves package-qualified classes, and supports unions of possible receivers. S3 providers choose a method when all alternatives agree. Static analysis keeps more specific evidence from the actual argument or body.
Signature help inside
display_score()usesformat_score.score. A parenthesized marker can describe a nominal S3 class with no generator. The built-in hint(`numeric`)covers both integer and double values. If both dispatch toformat_score.numeric, the server can show that method's signature. If they select different methods, the server can identify the integer method when the argument is a concrete1L.The same member analysis supports Polars method chains.
A wrapper that returns its argument can get its entire return type from a qualified
@param. A regression test requests completion before the package metadata arrives and checks that the original request receives the inferred members exactly once.The native traversal attaches hints to the relevant function literals, including those in deeply nested expressions. The syntax-name index then includes classes referenced only by those hints so providers can find their metadata. The independent CLI test fix is in #911.
Local
R CMD checkon R 4.6.1 passed with 24,723 assertions on this PR (171a383) and 25,514 on the combined stack (4218dd1). The four intermediate branches passed their focused suites. A separate fresh-process LSP check on both heads returned the fixture'sstatusmember on the first completion request.