Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 5, 2025

Bumps microsoft/typescript-go from fb0c169 to f16a4b7.

Commits
  • f16a4b7 Update vscode-languageclient to v10 (#2049)
  • 2ae4101 Store processing diagnostics on task instead of includeProcessor during file ...
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [microsoft/typescript-go](https://github.com/microsoft/typescript-go) from `fb0c169` to `f16a4b7`.
- [Commits](microsoft/typescript-go@fb0c169...f16a4b7)

---
updated-dependencies:
- dependency-name: microsoft/typescript-go
  dependency-version: f16a4b74c0663b390f96f9a9e7d3f7a3cc76f650
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file submodules Pull requests that update submodules code labels Dec 5, 2025
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 14.16667% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.18%. Comparing base (c1b48ea) to head (0b039ec).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/lsp/logger.go 0.00% 66 Missing ⚠️
pkg/lsp/server.go 0.00% 12 Missing ⚠️
pkg/project/logging/logger.go 0.00% 12 Missing ⚠️
pkg/project/logging/logtree.go 0.00% 12 Missing ⚠️
pkg/project/snapshot.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   45.20%   45.18%   -0.03%     
==========================================
  Files         349      350       +1     
  Lines      126473   126533      +60     
==========================================
- Hits        57173    57170       -3     
- Misses      65091    65155      +64     
+ Partials     4209     4208       -1     
Flag Coverage Δ
unittests 45.18% <14.16%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: buke <1013738+buke@users.noreply.github.com>
@buke
Copy link
Owner

buke commented Dec 6, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request bumps the microsoft/typescript-go dependency and includes a significant refactoring of the logging system. A new LSP-specific logger has been introduced, which is a great improvement for sending structured logs to the client. The general Logger interface has also been updated to support different log levels.

The review focuses on the consequences of this logging refactoring. While most changes are correct, I've found a few places where replacing the old logger.Write method with the new logger.Log method has led to incorrect log formatting. This is because Log adds a prefix and is intended for single-line messages, whereas Write was used for raw, potentially multi-line output. My comments provide details on these specific instances and how to fix them.

s.backgroundQueue.Enqueue(context.Background(), func(ctx context.Context) {
if s.options.LoggingEnabled {
s.logger.Write(newSnapshot.builderLogs.String())
s.logger.Log(newSnapshot.builderLogs.String())

Choose a reason for hiding this comment

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

medium

The Log method is designed for single-line messages and adds a prefix to each. However, newSnapshot.builderLogs.String() can return a multi-line string. When using the default logger, this results in the prefix being applied only to the first line of the output, which can make logs inconsistent and difficult to read. To ensure proper formatting, you should consider splitting the multi-line string and logging each line individually.

})
}
s.logger.Write("\n======== Cache Statistics ========")
s.logger.Log("\n======== Cache Statistics ========")

Choose a reason for hiding this comment

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

medium

The \n at the beginning of the string is likely a remnant from the conversion of logger.Write to logger.Log. With logger.Log, this will be treated as part of the message, resulting in a log entry that starts with a newline, which is probably not the intended formatting. The original Write call would have printed a blank line before the header. To achieve a similar effect, you should use two separate Log calls: one with an empty string, and one with the header. If you want to preserve the empty line, you should add s.logger.Log("") on the line before this.

Suggested change
s.logger.Log("\n======== Cache Statistics ========")
s.logger.Log("======== Cache Statistics ========")

defer func() {
if r := recover(); r != nil {
session.logger.Write(logger.String())
session.logger.Log(logger.String())

Choose a reason for hiding this comment

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

medium

The Log method is designed for single-line messages and adds a prefix. logger.String() can return a multi-line string from the LogTree. When using the default logger, this will result in the log prefix only being applied to the first line. For consistent formatting and readability, each line from the LogTree should be logged separately.

@buke buke merged commit d7ae476 into main Dec 6, 2025
3 checks passed
@buke buke deleted the dependabot/submodules/microsoft/typescript-go-f16a4b7 branch December 6, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file submodules Pull requests that update submodules code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants