Repository navigation
Share installed webR packages and attachment order with notebook language workers - #2009
Open
renkun-ken wants to merge 9 commits into
Open
renkun-ken wants to merge 9 commits into
renkun-ken wants to merge 9 commits into
Conversation
This was referenced Nov 28, 2026
… codex/webr-share-session-packages # Conflicts: # src/webr/serverModules.json
… codex/webr-share-session-packages # Conflicts: # src/languageService.ts # src/web/extension.ts # src/web/languageService.ts # src/webr/languageSession.ts
…are-session-packages
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.
Summary
Give the language workers serving a webR Interactive session a read-only view of the actual installed packages and the session's package search order. On a settled cell the execution worker inventories
.libPaths(); newly visible add-on packages are shared as digest-addressed, immutable Wasm filesystem images. This includes packages installed as WORKERFS mounts. Each notebook can see its own library while the execution worker is occupied. Ordinary project language clients keep their own context.On desktop the detached agent publishes verified package images and an atomic catalogue scoped to its private session generation. On the web the extension host retains the corresponding immutable images for the owning notebook. Analysis mounts the files without downloading the packages again. Replacement or removal can require a fresh R namespace/DLL environment; in this case the extension restores open buffers and their current text versions before switching analysis workers.
This also uses the hover formatting and package-context API from languageserver #907. The code prefers a compatible published API. The release prerequisite to pin a Wasm build that exports it remains tracked in #2003.
Verification
library(data.t…), emptydata.table::anddata.table::fread, unqualified completions after attachment, correct package masking, and disappearance after removal. Open documents survive language-worker replacement.library()hover text, selected text copy and full-hover copy in desktop VS Code. The reportedstartIndexwarning is from VS Code's notebook model; it did not recur in our copy tests.Stacked on #2008. Tracks #2003.