posit-dev / posit-dev/positron

Bootstrapped extensions can be added, but never removed

Open
#11,047 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Positron ships with a set of "bootstrapped" extensions, which are bundled with Positron and auto-installed when the user starts Positron, if they are not already installed.

https://github.com/posit-dev/positron/blob/79aa84557e00e07bff8c7a6ba5adaa7bc1a6ef5b/product.json#L120-L134

While we can use this list to add bootstrapped extensions, we cannot use it to remove previously installed bootstrapped extensions. This means that if we replace a bootstrapped extension with a different one, users will wind up with both. This has, in fact, already happened, with pyright and pyrefly.

Proposal

  • When a bootstrapped extension is installed by us, we write some metadata indicating that we are managing the installation.
  • This metadata persists if the extension is updated from the marketplace (as this is one of the reasons we use bootstrapped extensions)
  • When we detect an extension that has an installation managed by our bootstrapper but is no longer in the list of bootstrapped extensions, we remove it automatically.

Another way to approach this would be to have a (computed) version applied to the set of bootstrapped extensions, and to generate the set of actions to take based on the difference between the users' current version and the version of Positron that is starting. This would allow us to more or less respect all user modifications since we'd only be performing the changes between versions, not resetting everything every time (related to #8308).

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 bootstrapped extension list in product.json at lines 120-134, then trace the installation flow that consumes it. Determine where managed-installation metadata can persist through marketplace updates and how obsolete entries such as pyright are detected. Done means replaced bootstrapped extensions are removed automatically without removing user-managed extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop-dev, devtools
Issue type
Feature
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.