upgrade language client to version 10#14576
Conversation
bobbrow
left a comment
There was a problem hiding this comment.
There are a lot of files changed because the module upgrade resulted in some types being moved and I asked copilot to fix the compile errors.
There was a problem hiding this comment.
Are you sure this is possible without breaking compatibility with older VS Code version? I had updated to 9 recently and I seemed to recall that was the latest version possible at the time, but maybe 10 got released later?
UPDATE: Copilot says:
| vscode-languageclient version | Minimum VS Code (engines.vscode) |
|---|---|
| 10.1.0 (latest) | ^1.91.0 |
Our current min supported version is 1.77.0, and requiring 1.91 drops Ubuntu 16-18 and macOS 10.13/14/15.
We just recently upgraded to 9 and dropped support for Windows 7/8 etc. so it seems a little early to drop more OS support.
There was a problem hiding this comment.
Pull request overview
This PR upgrades the extension’s LSP client stack to vscode-languageclient@10.1.0 and adjusts TypeScript/module settings and imports to accommodate newer Node/ESM interoperability behavior, with the goal of improving stability/telemetry around client disconnects.
Changes:
- Upgrade
vscode-languageclientto^10.1.0and refreshyarn.locktransitive dependencies. - Switch TS compilation to Node16 module semantics (
module: node16,moduleResolution: node16) and update a handful of imports/usages accordingly. - Minor cleanup/compat fixes in UI bootstrap code and tests (assertions + CommonJS import style for some CJS-only libs).
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Extension/yarn.lock | Updates lockfile entries for the languageclient v10 dependency graph (e.g., semver/minimatch/brace-expansion, jsonrpc/protocol packages). |
| Extension/ui/settings.ts | Changes Settings UI bootstrap instantiation pattern. |
| Extension/ui.tsconfig.json | Moves UI TS build to Node16 module/moduleResolution. |
| Extension/tsconfig.json | Moves main TS build to Node16 module/moduleResolution. |
| Extension/test.tsconfig.json | Moves test TS build to Node16 module/moduleResolution. |
| Extension/test/scenarios/SingleRootProject/tests/ParsedEnvironmentFile.test.ts | Updates assertions to assert.ok(...) style. |
| Extension/test/scenarios/SingleRootProject/tests/copilotProviders.test.ts | Adjusts proxyquire import to CommonJS-compatible form. |
| Extension/test/common/selectTests.ts | Adjusts Mocha import style for Node16/CJS interop. |
| Extension/src/SSH/sshHosts.ts | Updates glob import style and related typing for async globbing. |
| Extension/src/LanguageServer/copilotCompletionContextProvider.ts | Adjusts selector typing for Copilot context provider registration. |
| Extension/src/LanguageServer/client.ts | Updates request typings/usages for vscode-languageclient v10 (e.g., RequestType0). |
| Extension/src/Debugger/configurationProvider.ts | Updates glob import style and related typing for async globbing. |
| Extension/src/common.ts | Switches documentSelector typing to VS Code API’s DocumentFilter type. |
| Extension/package.json | Bumps vscode-languageclient dependency to ^10.1.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| import * as jsonc from 'comment-json'; | ||
| import * as glob from 'glob'; | ||
| import { glob, IOptions } from 'glob'; |
|
|
||
| import { promises as fs } from 'fs'; | ||
| import * as glob from 'glob'; | ||
| import { glob, IOptions } from 'glob'; |
| @@ -5,12 +5,12 @@ | |||
|
|
|||
| import { readdir, readFile } from 'fs/promises'; | |||
| import { glob as globSync, IOptions } from 'glob'; | |||
| import { filepath } from '../../src/Utility/Filesystem/filepath'; | ||
| import Mocha = require('mocha'); | ||
|
|
||
| export const glob: (pattern: string, options?: IOptions | undefined) => Promise<string[]> = promisify(globSync); |
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const app: SettingsApp = new SettingsApp(); | ||
| void new SettingsApp(); |
Ok. I didn't look for a VS Code dependency change. I'll abandon this for now. |
I'm seeing some strange behavior in the crashing telemetry. It's hard to tell why the client is disconnecting from cpptools. In some cases it looks like cpptools is orphaned, not crashed, so I'm starting with upgrading the client module.
A follow up PR will add additional telemetry when an error happens in case that can provide us additional information.