Skip to content

Commit 55de8ac

Browse files
authored
Abstract DAP handler (#1170)
Progress towards posit-dev/positron#12104 We're going to have two handlers for DAP messages, one through the TCP connection for Console debugging, and one through a Jupyter connection (Control socket) for Notebook debugging. This PR abstracts out DAP handling to make it agnostic to the transport: a `DapHandler` takes a DAP message, handles it, and returns a `Result<DapHandlerOutput>`. `dispatch()` is in charge of transforming error cases to a DAP response (success or error). The caller (transport layer) then propagates via appropriate transport. Evaluate remains tied to the TCP transport because it needs to run R code asynchronously, and Jupyter's Control socket requires quick synchronous replies. This PR is pure reorganisation, no functional difference.
2 parents 19ab0a1 + e9eef70 commit 55de8ac

1 file changed

Lines changed: 656 additions & 542 deletions

File tree

0 commit comments

Comments
 (0)