Skip to content

chore: upgrade vscode-languageclient to 10.1.2 - #1831

Merged
renkun-ken merged 1 commit into
mainfrom
codex/upgrade-vscode-languageclient
Oct 6, 2026
Merged

renkun-ken merged 1 commit into
mainfrom
codex/upgrade-vscode-languageclient

Conversation

@renkun-ken

Copy link
Copy Markdown
Member

Upgrade vscode-languageclient from 9.0.1 to 10.1.2 to pick up current client fixes, including the JSON-RPC request-write failure fix when a language-server connection closes. Regenerate the pnpm lockfile, create the R language-server output as a LogOutputChannel, and switch TypeScript to Node16 module resolution so it resolves the new package exports while retaining CommonJS output.

The existing VS Code minimum remains 1.110.0. The upgrade is compatible with the latest R languageserver 0.3.20; most of its recent providers were already supported by client 9, so this change primarily improves reliability and maintenance.

Validation on macOS arm64 with R 4.6.1 and languageserver 0.3.20:

  • pnpm run typecheck, pnpm run lint, and pnpm run pretest passed.
  • Node suites: 116 tests passed, using a temporary R library for the missing renv test dependency.
  • VS Code 1.140.0: 391 extension tests and 2 isolated installation tests passed.
  • VS Code 1.110.0: all 55 Interactive integration tests passed.
  • A temporary integration harness exercised the extension's actual client creation over TCP and stdio on VS Code 1.110.0: completion, signature help, multiple-range formatting, diagnostics after edits, and shutdown passed for both transports.
  • Production VSIX packaging and packaged sess source identity verification passed.

@renkun-ken
renkun-ken requested a review from eitsupi October 6, 2026 11:07
@renkun-ken

Copy link
Copy Markdown
Member Author

Compatibility follow-up for #1801:

The published vscode-languageclient 10.1.2 used by this PR enforces VS Code 1.91.0, not 1.110.0. Its npm manifest declares engines.vscode: ^1.91.0; its published runtime contains REQUIRED_VSCODE_VERSION = '^1.91.0' and throws below that version. I checked the installed artifact and the separately fetched published package. The runtime check rejects 1.90.0 and accepts 1.91.0 and 1.103.1.

This updates the dependency-floor finding in my earlier comment in #1801:

Component Minimum
Published R 3.0.1 with language client 9.0.1 Client runtime requires 1.82.0
This PR with language client 10.1.2 Client runtime requires 1.91.0
R Syntax 0.1.4 Manifest requires 1.90.0
vscode-R manifest in this PR Still requires 1.110.0

I temporarily lowered only vscode-R's manifest for an isolated VS Code 1.91.0 on macOS arm64 check, then restored it. With its bundled Node 20.9.0 / Electron 29.4.0 and R 4.6.1 / languageserver 0.3.20, both TCP and stdio passed checks for real client startup, source completion, signature help, multiple-range formatting, diagnostics after edits, and shutdown. The extension and its dependency declarations also type-check against the VS Code 1.91.0 API declarations. Node16 in this PR's tsconfig is a module-resolution setting; it does not set the extension-host Node requirement.

1.91.0 is therefore the enforced and tested language-client floor, but I am not claiming that the entire extension is fully validated there. A broader 1.91.0 extension-suite attempt encountered repeated timeouts in Interactive session/HTML export/list-view cases and was stopped; those need investigation before lowering the extension's supported baseline. The full tests passed at the versions already reported in this PR.

For the original OpenVSCode Server 1.103.1 use case, 1.103.1 exceeds the upgraded client's and R Syntax's requirements. This upgrade introduces no dependency requirement that would exclude it, but vscode-R's unchanged ^1.110.0 manifest still blocks installation. Lowering that manifest in a separately validated compatibility change would permit testing there; the actual OpenVSCode Server attach/session, plots, help, and Interactive behavior still need verification.

@renkun-ken

Copy link
Copy Markdown
Member Author

I recommend engines.vscode: "^1.94.0" as the minimum for the current extension plus the vscode-languageclient 10.1.2 upgrade. 1.94.0 is the earliest published VS Code release that passed all current VS Code tests in this local compatibility sweep. The published language client itself requires only 1.91.0; that dependency floor is lower than the full-suite baseline.

Results at commit b523f589b0682193eb0344d1e7340ff4faeff3cc, on macOS arm64 with R 4.6.1, R languageserver 0.3.20 and arf 0.5.3:

VS Code Extension suite Separate installer suite
1.91.0 First failure after 305 passes Initial harness environment mistake; excluded
1.91.1 First failure after 305 passes 2 passed
1.92.0, 1.92.1, 1.92.2 Each: first failure after 305 passes Each: 2 passed
1.93.0 372 passed, 17 failed in a run without bail 2 passed
1.93.1 First failure after 305 passes 2 passed
1.94.0 391 passed, twice 2 passed, twice
1.97.0, 1.103.1 Each: 391 passed Each: 2 passed

Every published release from the client's 1.91.0 floor through 1.93.1 was tested. Runs used fresh, private user profiles and only temporarily lowered the extension manifest so VS Code could load it. The final 1.94.0 run used the normal timeout settings, no bail, no retries, no test changes and no skips. It ran with bundled Node 20.16.0 / Electron 30.5.1, including the test that launches the actual VS Code host runtime with no standalone Node on PATH.

The first failure on all lower versions was Run Selection can create a persistent Interactive session and ordinary R exit leaves a restored notice: it timed out waiting for the stopped-session notebook notice after q("no") (test). On 1.91.1 this test passed in isolation but failed in the complete run, so the evidence establishes a current-suite compatibility boundary, not an inherent API requirement. Several later failures in the no-bail 1.93.0 run cascaded from Interactive timeouts.

The other current checks passed: 116 Node tests, 1,246 sess R assertions, the 6 source/bootstrap tests plus R source-identity/installer tests, typecheck, lint, build and VSIX identity verification. The source and dependency declarations also type-check against the actual VS Code 1.94.0 API with declaration checking enabled.

This updates discussion #1801: 1.110.0 is not necessary to pass the current tests on macOS, and VS Code desktop 1.103.1 passed the complete suites. OpenVSCode Server 1.103.1 exceeds the recommended 1.94.0 baseline and R Syntax's declared 1.90.0 minimum. The actual server environment and a 1.94.0 Linux/Windows matrix have not been tested here; the existing PR CI is green on all three OSes with its configured test versions.

The manifest remains ^1.110.0 in this PR. This is the validated recommendation for a subsequent minimum-version change, not a permanent manifest edit made during the sweep.

@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.

Thank you!

@renkun-ken
renkun-ken merged commit accfacf into main Oct 6, 2026
5 checks passed
@renkun-ken
renkun-ken deleted the codex/upgrade-vscode-languageclient branch October 6, 2026 13:09
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