-
Notifications
You must be signed in to change notification settings - Fork 0
deps(deps): bump microsoft/typescript-go from fb0c169 to f16a4b7
#42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps(deps): bump microsoft/typescript-go from fb0c169 to f16a4b7
#42
Conversation
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>
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: buke <1013738+buke@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this 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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ========") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Bumps microsoft/typescript-go from
fb0c169tof16a4b7.Commits
f16a4b7Update vscode-languageclient to v10 (#2049)2ae4101Store processing diagnostics on task instead of includeProcessor during file ...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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)