Conversation
a4e988b to
f5f38f2
Compare
4ea0953 to
b13558e
Compare
9cd3d26 to
979897b
Compare
Introduce the 'sess' R package for WebSocket IPC, implement terminal orchestration, and modernize the session watcher architecture for improved reliability and performance.
485bcbd to
1a247cc
Compare
|
Thanks for the good work! I'm wondering how to make it work with self-managed R sessions, e.g. a radian console started in a tmux window? |
|
I'm also wondering if the dependencies of |
If you run sess::sess_app("ws://......")(at the moment of writing, it may be more convenient to copy the whoe command with Theorietically, we could replace websocket with base R socketConnect but it is not very efficient. I beleive most users will also install languageserver, I guess it is also possible to absorb the package into langugeserver which is kind of bloated already. |
|
Yes, that's true. languageserver has many dependencies already. One difference is that languageserver is not loaded in the user session while sess is. For me, less packages loaded in user session could be cleaner :) |
Sorry for the late reply.
I think minimally we will need |
49fb1f1 to
d20d532
Compare
Add end-to-end integration tests for the session watcher and terminal, refactor existing unit tests, and update GitHub Action workflows for improved CI reliability.
Apply session watcher stability fixes, swap R IPC client/server roles for reliability, perform final linting, and bump the version to 3.0.0-rc.0.
* Fix `rstudioapi::documentContext()` to return the complete document context, including `contents`, `path`, and `selection`. * Fix `rstudioapi::documentPath()` by accessing the corrected document context structure. * Refactor viewer dispatching to remove hardcoded `viewer` arguments from JSON-RPC payloads. `webview`, `dataview`, `browser`, and `page_viewer` now explicitly define their intent and dynamically resolve against the VS Code `session.viewers.viewColumn` settings. * Ignore `*.d.ts` files in `.eslintignore` to fix linting errors.
…rd() for sess package Ported changes from PR #1694 to dev branch, targeting sess package instead of legacy R/session/. Added handlers in session.ts and helpers in rstudioapi.ts. Co-authored-by: Iakov Davydov <idavydov@users.noreply.github.com>
Ported changes from PR #1693 to dev branch. Prepend params command when running selection or chunks from Rmd files with params in YAML frontmatter. Co-authored-by: tomtom <tomtom@users.noreply.github.com>
- Added tests for getRmdParamsCommand in rmdParams.test.ts - Exported getRmdParamsCommand in rTerminal.ts for testing - Renamed sesson.test.ts to workspaceViewer.test.ts to fix typo - Deleted duplicate workspace.ts file
- Added version comparison between bundled and installed sess package. - Added unit tests in sessInstall.test.ts. - Used exports workaround in util.ts to enable stubbing of local functions in tests.
… hooks for sess compatibility
|
I have spent sometime to make live share to work without success, finally realized that we need to whitelite our publisher id: #1218 But It seems that microsoft is not being very active there, we might have to drop the Live share functionality here. |
d905392 to
16675e1
Compare
The sess package is now bundled with the VSCode extension, we might move it to its own repository in the future.
Everything below this sentence was generated automatically.
🚀 Feature: Migrate Session Watcher to WebSockets & JSON-RPC 2.0
📝 Overview
This PR introduces a major architectural upgrade to vscode-R by replacing the legacy, file-based session watcher with a high-performance, token-authenticated IPC (Inter-Process Communication) mechanism.
The new system operates over a pure WebSocket architecture using JSON-RPC 2.0, enabling reliable, bidirectional communication between the R session and the VS Code extension.
✨ Key Changes
1. New
sessR Packagesesspackage to handle the server-side IPC.sess::register_hooks) andrstudioapiemulation.2. Client Session Manager Modernization
src/session.tsrefactored: Heavily refactored the extension's session manager to act as a JSON-RPC client/server.3. Viewer Architecture Overhaul
httpgdViewer.tsandstandardViewer.ts).helpViewerandwebViewerimplementations to cleanly integrate with the new IPC layer.4. Comprehensive Testing & CI Modernization
session.test.ts) and terminal (terminal.test.ts).main.yml,pre-release.yml,release.yml) to support the new testing architecture and package building steps.💡 Motivation & Background
The previous file-based session watcher (writing state to
.vscode-Rdirectories) was prone to race conditions, slow I/O, and was strictly one-way (R -> VS Code).By migrating to WebSockets and JSON-RPC 2.0:
🧪 Testing Performed
httpgdand standard viewers.rstudioapiemulation and global environment variable syncing.Note: Ensure to check any new dependencies introduced in
package.jsonandpackage-lock.jsonare properly installed before building.