[all-commits] [llvm/llvm-project] f3f6f2: [mlir-lsp] Initialize Reply::method member (#89857)
Brian Gesiak via All-commits
all-commits at lists.llvm.org
Wed Apr 24 12:44:29 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f3f6f22dfcced21116710a477c78e0739c942139
https://github.com/llvm/llvm-project/commit/f3f6f22dfcced21116710a477c78e0739c942139
Author: Brian Gesiak <brian at modocache.io>
Date: 2024-04-24 (Wed, 24 Apr 2024)
Changed paths:
M mlir/lib/Tools/lsp-server-support/Transport.cpp
Log Message:
-----------
[mlir-lsp] Initialize Reply::method member (#89857)
When debug level logging is enabled (by adding a call to
`Logger::setLogLevel(Logger::Level::Debug)`), the
`TransportInputTest.RequestWithInvalidParams` unit test logs:
```
[18:35:00.565] --> reply:(92)
```
The format string for this log statement is `"--> reply:{0}({1})"`,
where `{0}` is the original request's method name (that is, the method
name of the request being replied to), and `{1}` is the request ID.
However, because the `Reply` class never initializes its `method`
member, `{0}` is always empty. Initializing it results in the (nicer)
log error below:
```
I[18:35:00.565] --> reply:invalid-params-request(92)
```
Because this is only ever logged for now, its not possible to add a test
case for this. Future patches will rely on `method` being initialized,
however, and will add test cases for this path.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list