Skip to content

Commit 6844c2f

Browse files
committed
Revert 4 last "[mlir-lsp]" commits: pre-merge bot is broken
This reverts commits: - f3f6f22. - 37e13d4. - ba1b52e. - 84bc21f.
1 parent 93de97d commit 6844c2f

File tree

6 files changed

+6
-148
lines changed

6 files changed

+6
-148
lines changed

mlir/include/mlir/Tools/lsp-server-support/Transport.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,9 @@ class MessageHandler {
147147
void (ThisT::*handler)(const Param &)) {
148148
notificationHandlers[method] = [method, handler,
149149
thisPtr](llvm::json::Value rawParams) {
150-
llvm::Expected<Param> param =
151-
parse<Param>(rawParams, method, "notification");
152-
if (!param) {
153-
return llvm::consumeError(
154-
llvm::handleErrors(param.takeError(), [](const LSPError &lspError) {
155-
Logger::error("JSON parsing error: {0}",
156-
lspError.message.c_str());
157-
}));
158-
}
150+
llvm::Expected<Param> param = parse<Param>(rawParams, method, "request");
151+
if (!param)
152+
return llvm::consumeError(param.takeError());
159153
(thisPtr->*handler)(*param);
160154
};
161155
}

mlir/lib/Tools/lsp-server-support/Transport.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class Reply {
5151

5252
Reply::Reply(const llvm::json::Value &id, llvm::StringRef method,
5353
JSONTransport &transport, std::mutex &transportOutputMutex)
54-
: method(method), id(id), transport(&transport),
54+
: id(id), transport(&transport),
5555
transportOutputMutex(transportOutputMutex) {}
5656

5757
Reply::Reply(Reply &&other)
58-
: method(other.method), replied(other.replied.load()),
59-
id(std::move(other.id)), transport(other.transport),
58+
: replied(other.replied.load()), id(std::move(other.id)),
59+
transport(other.transport),
6060
transportOutputMutex(other.transportOutputMutex) {
6161
other.transport = nullptr;
6262
}

mlir/unittests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ add_subdirectory(Support)
2020
add_subdirectory(Rewrite)
2121
add_subdirectory(TableGen)
2222
add_subdirectory(Target)
23-
add_subdirectory(Tools)
2423
add_subdirectory(Transforms)
2524

2625
if(MLIR_ENABLE_EXECUTION_ENGINE)

mlir/unittests/Tools/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

mlir/unittests/Tools/lsp-server-support/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

mlir/unittests/Tools/lsp-server-support/Transport.cpp

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)