REditorSupport / REditorSupport/vscode-R

R session background connections

Open
#440 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

engineering feature-request
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

In #394, notebook.R runs a socket connection that the notebook communicates with. Would it be worth extracting part of this out so that a socket connection is available for each R session started by the user? This would make the following possible:

  • Sending VS Code's R commands to the session invisibly, rather than having to send them as text to the console
  • Querying the session, for example to get the names of data frames
  • For Run Selection/Line, potentially using R instead of TypeScript to choose which lines to send (allowing use of R's parse functions)
  • Inline evaluation (sending user code to the session invisibly, and displaying the results in the editor) - this one's not really necessary but some other languages/IDE's have it and it's kind of cool

@renkun-ken You wrote notebook.R and the session watcher, which has some overlap with this proposal, so you're definitely the best person to comment. Does this sound practical? Let me know if I need to clarify anything.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading notebook.R and the session watcher work referenced in #394, then review the proposed per-session socket use cases. The issue needs a decided scope and practical design before implementation can begin; done would require an agreed approach for session connections and its supported commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.