Repository navigation
Conversation
…quests Switch the socket session's hover and completion handlers to the shared inspection parser and resolver, so the request text is no longer passed to eval(). Requests that resolve to a name, a constant, or a chain of $ and @ accesses give the same results as before; other requests give no result. Errors are reported as no result and interrupts still propagate. The Interactive interrupt test now makes inspection slow with an active binding, since hover no longer evaluates arbitrary expressions.
eitsupi
marked this pull request as ready for review
November 15, 2026 12:04
This branch has not been deployed
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
Follow-up to #1949. The socket session's
hoverandcompletionhandlers now use the shared inspection parser and resolver instead ofeval(parse(text = expr)). The request text is no longer evaluated, so hoveringcounterinrepeat counter <- counter + 1no longer hangs the R session, and the same applies to completion afterrepeat x$.Behavior
$and@accesses on a name give the same hover text and completion items as before. This covers data frames, lists, environments, S3 classes with$and.DollarNames()methods, S4 slots, R6 objects, data.table,a $ bwith spaces, and constants such as1,TRUE,NULLand0x10..DollarNames()method, reach the dispatcher, which replied with an error and printed a warning in the console. Both handlers now give no result, because hover and completion run without an explicit user action.Other changes
local({ ...; Sys.sleep(30) })as the hover request, which is now rejected. It now hovers an active binding that sleeps when read.