ashgti wrote: > If we want to support cancellation before moving all the request over to the > protocol class, can we _temporarily_ store both the JSON and the Protocol in > the class we instantiate per request (whether that's the RequestHandler > itself, or a class wrapping it) and use whichever one we need for that given > request?
For the `LegacyRequestHandler`, its more to do with the response than the request. We can store the request as a `protocol::Message` and in the `LegacyRequestHandler` we convert it back into a `json::Value` before we pass it to the handler. But the `LegacyRequestHandler`'s all tend to call `dap.SendJSON` directly with a `json::Value`. In my current impl of the cancel request, I check for the cancelled requests prior to sending them https://github.com/llvm/llvm-project/blob/1c2d19b901390c6080c1367341115150661a6a14/lldb/tools/lldb-dap/DAP.cpp#L245-L258 https://github.com/llvm/llvm-project/pull/130169 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits