Skip to content

fix: require workspace trust for R and start Help on demand - #1996

Merged
renkun-ken merged 4 commits into
mainfrom
codex/trust-lazy-help
Nov 25, 2026
Merged

renkun-ken merged 4 commits into
mainfrom
codex/trust-lazy-help

Conversation

@renkun-ken

Copy link
Copy Markdown
Member

The R runtime now declares that it requires a trusted workspace. VS Code handles activation after trust is granted, and the independent R syntax extension remains available in Restricted Mode.

Trusted activation registers Help without starting its R server. The first page, alias, or package index request starts the server. Concurrent requests share the process, and reading a persisted package index starts its package-change listener.

I tested installed extensions in VS Code 1.101.0 and 1.145.2 on macOS. Restricted Mode kept the runtime inactive with R syntax available. With the language server disabled, opening an R document launched zero R processes, and two concurrent Help requests loaded both pages through one process. The 22 Help tests, activation-runner unit tests, build, typecheck, lint, and formatting checks passed.

This addresses the eager Help process described in #1923. The origin of the additional Windows workers in that report is still open.

Refs #1923

@renkun-ken
renkun-ken requested a review from eitsupi November 25, 2026 09:50

@eitsupi eitsupi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by ChatGPT.

Minor design concern: PackageManager now calls this.rHelp.helpProvider.start() directly, making it aware of the Help server's lifecycle. Could this responsibility be encapsulated within RHelp instead?

This is non-blocking.

@renkun-ken
renkun-ken merged commit d03446f into main Nov 25, 2026
20 of 21 checks passed
@renkun-ken
renkun-ken deleted the codex/trust-lazy-help branch November 25, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants