Repository navigation
Make Interactive notebooks follow their session’s language runtime - #2007
Open
renkun-ken wants to merge 6 commits into
Open
renkun-ken wants to merge 6 commits into
renkun-ken wants to merge 6 commits into
Conversation
This was referenced Nov 28, 2026
…p-follows-session
…p-follows-session
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.enabledstill 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.