[Mlir-commits] [mlir] a8c88de - Revert "[mlir-lsp] Rename `OutgoingNotification` (NFC) (#90076)"
Brian Gesiak
llvmlistbot at llvm.org
Thu Apr 25 19:00:24 PDT 2024
Author: Brian Gesiak
Date: 2024-04-25T21:59:22-04:00
New Revision: a8c88de0dff865d1969b654bb5c0df181aa2df6a
URL: https://github.com/llvm/llvm-project/commit/a8c88de0dff865d1969b654bb5c0df181aa2df6a
DIFF: https://github.com/llvm/llvm-project/commit/a8c88de0dff865d1969b654bb5c0df181aa2df6a.diff
LOG: Revert "[mlir-lsp] Rename `OutgoingNotification` (NFC) (#90076)"
This reverts commit b77416ea156acdec. While that seemed like an
appropriate rename at the time, further review on pull request #90078
makes it unnecessary. This revert changes the name back.
Added:
Modified:
mlir/include/mlir/Tools/lsp-server-support/Transport.h
mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Tools/lsp-server-support/Transport.h b/mlir/include/mlir/Tools/lsp-server-support/Transport.h
index b973a2e267251a..44c71058cf717c 100644
--- a/mlir/include/mlir/Tools/lsp-server-support/Transport.h
+++ b/mlir/include/mlir/Tools/lsp-server-support/Transport.h
@@ -95,10 +95,10 @@ class JSONTransport {
template <typename T>
using Callback = llvm::unique_function<void(llvm::Expected<T>)>;
-/// An OutgoingMessage<T> is a function used for outgoing requests or
-/// notifications to send to the client.
+/// An OutgoingNotification<T> is a function used for outgoing notifications
+/// send to the client.
template <typename T>
-using OutgoingMessage = llvm::unique_function<void(const T &)>;
+using OutgoingNotification = llvm::unique_function<void(const T &)>;
/// A handler used to process the incoming transport messages.
class MessageHandler {
@@ -160,10 +160,9 @@ class MessageHandler {
};
}
- /// Create an OutgoingMessage function that, when called, sends a notification
- /// with the given method via the transport.
+ /// Create an OutgoingNotification object used for the given method.
template <typename T>
- OutgoingMessage<T> outgoingNotification(llvm::StringLiteral method) {
+ OutgoingNotification<T> outgoingNotification(llvm::StringLiteral method) {
return [&, method](const T ¶ms) {
std::lock_guard<std::mutex> transportLock(transportOutputMutex);
Logger::info("--> {0}", method);
diff --git a/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp b/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
index bd7f2a5dedc257..0f23366f6fe80a 100644
--- a/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
+++ b/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
@@ -91,7 +91,7 @@ struct LSPServer {
/// An outgoing notification used to send diagnostics to the client when they
/// are ready to be processed.
- OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
+ OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
/// Used to indicate that the 'shutdown' request was received from the
/// Language Server client.
diff --git a/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp b/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
index ffaa1c8d4de46f..f02372367e38c8 100644
--- a/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
+++ b/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
@@ -104,7 +104,7 @@ struct LSPServer {
/// An outgoing notification used to send diagnostics to the client when they
/// are ready to be processed.
- OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
+ OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
/// Used to indicate that the 'shutdown' request was received from the
/// Language Server client.
diff --git a/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp b/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
index bc312d18ea4037..b62f68db9d60fa 100644
--- a/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
+++ b/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp
@@ -72,7 +72,7 @@ struct LSPServer {
/// An outgoing notification used to send diagnostics to the client when they
/// are ready to be processed.
- OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
+ OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
/// Used to indicate that the 'shutdown' request was received from the
/// Language Server client.
More information about the Mlir-commits
mailing list