[all-commits] [llvm/llvm-project] 1ba8b3: [lldb] Adopt JSONTransport in the MCP Server (Rela...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Mon Aug 25 16:18:42 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1ba8b36fef84bedb0a657b570076ec1a47e9061d
https://github.com/llvm/llvm-project/commit/1ba8b36fef84bedb0a657b570076ec1a47e9061d
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2025-08-25 (Mon, 25 Aug 2025)
Changed paths:
M lldb/include/lldb/Protocol/MCP/Server.h
M lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
M lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.h
M lldb/source/Protocol/MCP/Server.cpp
M lldb/unittests/CMakeLists.txt
M lldb/unittests/Protocol/CMakeLists.txt
A lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
R lldb/unittests/ProtocolServer/CMakeLists.txt
R lldb/unittests/ProtocolServer/ProtocolMCPServerTest.cpp
Log Message:
-----------
[lldb] Adopt JSONTransport in the MCP Server (Reland) (#155322)
This PR adopts JSONTransport in the MCP server implementation. It
required a slight change in design in the relationship between the two
server classes. Previously, these two had an "is-a" connection, while
now they have a "has-a" connection.
The "generic" protocol server in Protocol/MCP now operates using a
single connection (Transport). This matches the design in DAP where each
DAP instance has its own connection. The protocol server in Plugins
still supports multiple clients and creates a new server instance for
each connection.
I believe the new design makes sense in the long term (as proved by DAP)
and allows us to make the server stateful if we choose to do so. There's
no reason that multiple client support can't live in the generic
protocol library, but for now I kept it in ProtocolServerMCP to avoid
creating unnecessary abstractions.
This is a reland of #155034 but with significant changes to the tests.
The unit tests now test the generic server implementation, which matches
the original intent. This also means the test are now single threaded
and therefore fully deterministic using the MainLoop.
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