Skip to content

Abstract DAP handler#1170

Open
lionel- wants to merge 7 commits intomainfrom
notebook/dap-abstraction
Open

Abstract DAP handler#1170
lionel- wants to merge 7 commits intomainfrom
notebook/dap-abstraction

Conversation

@lionel-
Copy link
Copy Markdown
Contributor

@lionel- lionel- commented Apr 25, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant