You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This surfaced as a deprecation warning after the vscode-languageclient bump in #11643. Migrating to the "pull" configuration model was left out of that dependency-update PR (the oxlint-disable remains) and is tracked here.
What's actually deprecated
Only the LSP push model via synchronize.configurationSection. The server (packages/compiler/src/server/client-config-provider.ts) already uses the pull API for the initial load:
Registering with the section means vscode-languageclient still sends params.settings.typespec, so the existing onDidChangeConfiguration handler keeps working. (Alternatively, register section-less and re-pull via getConfiguration("typespec") inside the handler.)
This is the first dynamic client.register in the server, so guard it behind the capability so non-VS-Code consumers (playground / standalone CLI) don't error.
Testing
There are no automated tests for the config-sync path, so this needs manual verification in the VS Code extension:
Settings load correctly on server startup.
Settings live-update on change (e.g. toggling typespec.lsp.emit).
Non-VS-Code language-server consumers still initialize without errors.
Context
packages/typespec-vscode/src/tsp-language-client.tsuses the deprecatedsynchronize.configurationSectionoption ofvscode-languageclient(LSP "push" configuration model):This surfaced as a deprecation warning after the
vscode-languageclientbump in #11643. Migrating to the "pull" configuration model was left out of that dependency-update PR (theoxlint-disableremains) and is tracked here.What's actually deprecated
Only the LSP push model via
synchronize.configurationSection. The server (packages/compiler/src/server/client-config-provider.ts) already uses the pull API for the initial load:The only piece depending on the deprecated push is the change-notification handler, which reads the pushed payload:
Config is consumed read-only in two spots in
compile-service.ts(config?.lsp?.emitandconfig?.entrypoint); those are unaffected.Proposed migration
tsp-language-client.ts— removeconfigurationSection: "typespec"(and its comments /oxlint-disable); keepfileEvents: watchers.server.tsonInitialize— captureparams.capabilities.workspace?.didChangeConfiguration?.dynamicRegistration.client-config-provider.ts— when that capability is present, register for change notifications in the pull model:vscode-languageclientstill sendsparams.settings.typespec, so the existingonDidChangeConfigurationhandler keeps working. (Alternatively, register section-less and re-pull viagetConfiguration("typespec")inside the handler.)This is the first dynamic
client.registerin the server, so guard it behind the capability so non-VS-Code consumers (playground / standalone CLI) don't error.Testing
There are no automated tests for the config-sync path, so this needs manual verification in the VS Code extension:
typespec.lsp.emit).References
packages/typespec-vscode/src/tsp-language-client.ts(configurationSection)packages/compiler/src/server/client-config-provider.ts