Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Nov 10, 2025

This has two negative effects:

  • All of our current logging appears as "error" output because it went over stderr.
    • "Fixed" by introducing leveled logging.
  • All LSP logging is hidden by default, which is perhaps good for end users but sort of annoying for debugging.

But, fixes client bugs we've experienced.

@jakebailey jakebailey marked this pull request as ready for review December 5, 2025 00:04
@jakebailey jakebailey requested review from DanielRosenwasser, andrewbranch and Copilot and removed request for Copilot December 5, 2025 00:04
Copilot finished reviewing on behalf of jakebailey December 5, 2025 00:07
Copilot AI review requested due to automatic review settings December 5, 2025 00:08
Copilot finished reviewing on behalf of jakebailey December 5, 2025 00:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the VS Code language client from v9 to v10.0.0-next.18 and introduces leveled logging to properly integrate with the new client version. The main motivation is that vscode-languageclient v10 treats all stderr output as errors, so the update includes adding Info/Warn/Error logging levels that map to LSP log message types.

Key Changes:

  • Update vscode-languageclient to v10.0.0-next.18 (and VS Code engine to 1.106.0)
  • Add leveled logging methods (Error, Warn, Info) to the Logger interface
  • Create LSP-specific logger that sends log messages via LSP protocol
  • Remove unused ServerOptions fields (Client, Logger)

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package-lock.json Updates vscode-languageclient and related dependencies to v10, adjusts dev dependency flags
_extension/package.json Updates vscode-languageclient to v10.0.0-next.18 and VS Code engine to 1.106.0
_extension/src/extension.ts Changes output channels to use LogOutputChannel type with log: true option
_extension/src/client.ts Updates to use LogOutputChannel and adds hint about trace log level
internal/project/logging/logger.go Adds Error/Warn/Info leveled logging methods, removes Write() method
internal/project/logging/logtree.go Adds Error/Warn/Info leveled logging methods, removes Write() method
internal/project/logging/logtree_test.go Removes Write() from test interface
internal/lsp/logger.go New LSP-specific logger that sends log messages via window/logMessage notifications
internal/lsp/server.go Uses new logger, removes unused ServerOptions fields, replaces Log() calls with appropriate levels
internal/project/snapshot.go Replaces Write() with Log()
internal/project/session.go Replaces Write() with Log()
internal/lsp/lsproto/_generate/metaModelSchema.mts Updates LSP meta model schema with new clientCapability and serverCapability fields
internal/lsp/lsproto/_generate/fetchModel.mts Updates hash to fetch updated meta model from vscode-languageserver-node

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't love the changes that were pushed on us with this, but this implementation seems fairly non-disruptive

@jakebailey
Copy link
Member Author

Alternatively, I can implement my own LogOutputChannel (it's just an interface) which logs to a non-log output, but I don't think that's going to work so well with the log level / event emitter :\

Probably best to acquiesce

@jakebailey jakebailey added this pull request to the merge queue Dec 5, 2025
Merged via the queue into main with commit f16a4b7 Dec 5, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/update-lsp-client branch December 5, 2025 18:24
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.

4 participants