posit-dev / posit-dev/positron

R: Provide a way to register R RPCs from the R extension

Open
#2,008 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang: r
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Today, if you want to call R from the R extension, it is easier than it used to be, but still a real chore. You must:

  • write the implementation in one of the R files in the amalthea project (e.g.: https://github.com/posit-dev/amalthea/pull/194)
  • get it reviewed and merged into main
  • bump the amalthea version
  • wait for successful build
  • coordinate a merge into positron

Not only is this a lot of paperwork, it also creates unnecessary coupling between Positron and ark: because the RPC invocation and implementation live in different repositories, it is much easier for them to be out of sync (e.g. parameters or return types mismatched).

I propose that we:

In this way, we can keep some RPC invocations and implementations in the same repository, and reduce some coupling and paperwork when working on code with feet in both worlds.

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 with the proposed call site in positron-r/resources/scripts/startup.R and inspect how ark currently defines and invokes R RPCs. Determine the registration API and repository boundaries needed to keep definitions and implementations in the R extension; done means an R extension can register and invoke its own RPCs without changes to ark's R modules or a coordinated amalthea release.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.