Skip to content

Make Interactive notebooks follow their session’s language runtime - #2007

Open
renkun-ken wants to merge 6 commits into
codex/webr-browser-extensionfrom
codex/interactive-lsp-follows-session
Open

renkun-ken wants to merge 6 commits into
codex/webr-browser-extensionfrom
codex/interactive-lsp-follows-session

Conversation

@renkun-ken

Copy link
Copy Markdown
Member

Bind analysis to the execution session

Give R Interactive notebooks and inputs a language server selected from their owning session. A webR session uses a separate webR analysis worker. A managed or adopted arf session uses native R and its recorded executable, library paths and working directory. This applies even when the workspace selects the opposite runtime for source files. Disabling r.lsp.enabled still disables both.

Ordinary source files keep their workspace language service. Executing a selection or switching tabs does not switch that service. Browser Interactive notebooks have their own analysis context, including when native R is selected for ordinary source documents on a browser-only host.

Track which session and language environment actually started a virtual client. An editor-open event that reuses a client cannot accidentally mark its owner as changed and suppress the necessary restart. Handle binding, detachment, restart, metadata changes, and independently open notebooks.

The webR console and analysis worker have separate R heaps and package libraries. This change establishes runtime and session ownership. Synchronizing packages installed later in a webR console is further work.

Verification

The desktop regressions exercise both explicit preference conflicts, initial binding, temporary unbinding, and rebinding. The VS Code for the Web test exercises notebook ownership under a native source preference and disabling the language service.

In real desktop VS Code with native R installed, a webR-only package provided a runtime identity check. With a native source preference, the bound webR input resolved its help and the ordinary source reported it missing. With a webR source preference, the ordinary source resolved the same help and the bound arf input reported it missing. Both source files retained their original results after the notebook was opened.

Stacked on #2006. Related to #2003.

…p-follows-session

# Conflicts:
#	website/docs/features/language-service.md
…p-follows-session

# Conflicts:
#	package.json
#	website/docs/features/language-service.md

This branch has not been deployed

No deployments
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.

1 participant