posit-dev / posit-dev/positron

Un-register interpreter when a runtime is removed by user

Open
#8,447 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: console area: runtimes
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

System details:

Positron and OS details:

Positron Version: 2025.07.0 build 204
Code - OSS Version: 1.100.3
Commit: 03ae7a5393c776bb24c23d2aa6a6bfbba90cbc5e
Date: 2025-06-30T16:29:03.492Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Interpreter details:

Any interpreter

Describe the issue:

In #4269 we added a command to kick off interpreter discovery again so that new runtimes added by a user while Positron is open are discovered and show up in the UI. The workbench.action.language.runtime.discoverAllRuntimes command only adds new interpreters and cannot remove interpreters that are no longer present on the user's system.

We need to add a mechanism to remove interpreters from the list of registered runtimes so the user can't initiate creation of a new interpreter session for a runtime that no longer is available. When a user tries to create a session for a removed runtime, they get an interpreter session that they can't interact with.

Steps to reproduce the issue:

This is not rig-specific, it's just the steps used to illustrate the issue.

Pre-reqs

  1. rig add <VERSION_OF_R>; I did rig add devel which installed R 4.5.0 at the time
  2. Open Positron and click on the interpreter picker to view the list of registered runtimes. Verify this version shows up in the list.
  3. Select the version of R that that you just added in step 1 to create a console instance for this interpreter. Wait for the Console to start up successfully, e.g. with R 4.3.3
  4. rig rm <VERSION_OF_R>; rig rm devel which removed R 4.5.0 for this example
  5. Click on the interpreter picker and select the R interpreter that was just removed; R 4.5.0 in this case
  6. See startup error in the console instance with the shutdown status indicator

This video recording shows what happens in Positron after step 4:

https://github.com/user-attachments/assets/1dc11b2f-ca3a-4ae3-bef3-3ad970fd2264

Expected or desired behavior:

We should not kick off creation of an interpreter session that no longer exists.

Were there any error messages in the UI, Output panel, or Developer Tools console?

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 workbench.action.language.runtime.discoverAllRuntimes command and trace how interpreter discovery registers runtimes for the interpreter picker. Reproduce the rig add and rig rm sequence, then verify that discovery removes unavailable interpreters and that selecting one no longer starts an unusable session.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.