Problem
Changing rstack.rslint.trace.server restarts the whole extension instead of updating the trace level in place.
trace.server is listed in the Rslint controller's restartOnSettings (packages/vscode/src/stacks/lint/index.ts:71-75). The shell answers any matching configuration change with restart(undefined, …) (packages/vscode/src/extension.ts:73-110), which expands to every stack (extension.ts:248-257). So flipping a debug-only setting from off to messages:
- retires Rslint, Rstest and fmt (status bar goes to
starting),
- sends
didClose for every open document and deletes its diagnostics,
- disposes the Rstest
TestController (the Test Explorer tree is destroyed and rebuilt),
- stops every fmt server,
- re-runs detection and rebuilds all three stacks.
The replacement client only attaches a trace channel and calls client.setTrace when the setting is non-off at construction time (packages/vscode/src/stacks/lint/Rslint.ts:415-445,509-514), so there is no path to enable tracing on a running client.
Upstream behavior
The standalone rslint extension supplied a traceOutputChannel unconditionally and let vscode-languageclient own the setting: it puts the initial value into the initialize request's trace field and sends $/setTrace on every later change, with no restart (rslint@origin/main:packages/vscode-extension/src/Rslint.ts:96-119,429-434). Its E2E asserts that off → messages → verbose → off reaches every running client via $/setTrace while each server's start count stays at 1 (packages/vscode-extension/__tests__/suite-jsconfig/trace-output-channel.test.ts:200-300).
Proposal
- Drop
trace.server from restartOnSettings in stacks/lint/index.ts.
- Pass the trace channel to the language client unconditionally so
vscode-languageclient handles $/setTrace itself; remove the manual setTrace call.
- Keep the shared
Rstack: Rslint channel for trace output (the four-channel layout in channels.ts is a deliberate cap and unrelated to whether a restart is needed).
- Add an E2E in
e2e/lint/ mirroring the upstream assertions: changing the setting notifies running clients and does not restart any server.
- Check whether
rstack.fmt.trace.server has the same issue and apply the same fix.
Context
Found while auditing the standalone rslint/rstest extensions for sunset. This is the only confirmed behavior regression relative to the standalone extensions.
Problem
Changing
rstack.rslint.trace.serverrestarts the whole extension instead of updating the trace level in place.trace.serveris listed in the Rslint controller'srestartOnSettings(packages/vscode/src/stacks/lint/index.ts:71-75). The shell answers any matching configuration change withrestart(undefined, …)(packages/vscode/src/extension.ts:73-110), which expands to every stack (extension.ts:248-257). So flipping a debug-only setting fromofftomessages:starting),didClosefor every open document and deletes its diagnostics,TestController(the Test Explorer tree is destroyed and rebuilt),The replacement client only attaches a trace channel and calls
client.setTracewhen the setting is non-offat construction time (packages/vscode/src/stacks/lint/Rslint.ts:415-445,509-514), so there is no path to enable tracing on a running client.Upstream behavior
The standalone rslint extension supplied a
traceOutputChannelunconditionally and letvscode-languageclientown the setting: it puts the initial value into theinitializerequest'stracefield and sends$/setTraceon every later change, with no restart (rslint@origin/main:packages/vscode-extension/src/Rslint.ts:96-119,429-434). Its E2E asserts thatoff → messages → verbose → offreaches every running client via$/setTracewhile each server's start count stays at 1 (packages/vscode-extension/__tests__/suite-jsconfig/trace-output-channel.test.ts:200-300).Proposal
trace.serverfromrestartOnSettingsinstacks/lint/index.ts.vscode-languageclienthandles$/setTraceitself; remove the manualsetTracecall.Rstack: Rslintchannel for trace output (the four-channel layout inchannels.tsis a deliberate cap and unrelated to whether a restart is needed).e2e/lint/mirroring the upstream assertions: changing the setting notifies running clients and does not restart any server.rstack.fmt.trace.serverhas the same issue and apply the same fix.Context
Found while auditing the standalone rslint/rstest extensions for sunset. This is the only confirmed behavior regression relative to the standalone extensions.