Skip to content

[#271] runHDBServer parametrized on DebugRunner#274

Merged
alt-romes merged 1 commit into
masterfrom
abstract-hie
May 5, 2026
Merged

[#271] runHDBServer parametrized on DebugRunner#274
alt-romes merged 1 commit into
masterfrom
abstract-hie

Conversation

@Saizan
Copy link
Copy Markdown
Collaborator

@Saizan Saizan commented Apr 16, 2026

runDebugger now takes a DebugRunner parameter which takes care of providing a session and an action to load the debuggee home units.

The DebugRunner parametrization is pushed up the call stack until we can define a
runHDBServer function which could be used from elsewhere to start a DAP server.

@Saizan Saizan changed the base branch from master to ghc-debugger-259 April 17, 2026 07:27
@alt-romes
Copy link
Copy Markdown
Collaborator

The ubuntu runner was hanging.

I've made some changes to the error/request abortion cycle which should make the DAP testsuite better at exiting with an error rather than hanging in #260 (notably, 5a163db)

@alt-romes alt-romes force-pushed the ghc-debugger-259 branch 3 times, most recently from cb45ff9 to 12fb0d5 Compare April 20, 2026 16:04
@Saizan Saizan changed the base branch from ghc-debugger-259 to master April 21, 2026 11:20
@Saizan Saizan force-pushed the abstract-hie branch 4 times, most recently from 4c2abe1 to 7826d8d Compare April 29, 2026 11:47
@Saizan Saizan force-pushed the abstract-hie branch 2 times, most recently from 506c7e3 to cea40af Compare May 4, 2026 12:26
@Saizan Saizan changed the title [#271] Parametrize initDebugger to take GHC session rather than use HieBios [#271] runHDBServer parametrized on DebugRunner May 4, 2026
@Saizan Saizan marked this pull request as ready for review May 4, 2026 12:34
@Saizan
Copy link
Copy Markdown
Collaborator Author

Saizan commented May 4, 2026

@alt-romes about the Sdist tests, should I handle the source-package-repository dependence on dap like haskell-debugger-view or would it make sense to release dap-0.6 ?

@alt-romes
Copy link
Copy Markdown
Collaborator

alt-romes commented May 4, 2026

@alt-romes about the Sdist tests, should I handle the source-package-repository dependence on dap like haskell-debugger-view or would it make sense to release dap-0.6 ?

@Saizan

Hmm. We need to make sure dap is released when we do a release, which is why this is a good CI check.

A few ideas:

  1. Temporarily add a source-repository package stanza to a temporary cabal.project file in the sdist test
  2. Make the sdist test only run on the release pipeline (but then subtle packaging bugs might be caught too late and it'd be annoying)
  3. Release 0.6 now and more versions as necessary

The benefit of not releasing immediately is bundling more changes into a single release, but then again it's not that much of a worry to release a lot. Especially since we don't necessarily envision changing dap a lot.

@dmjio is releasing often fine for you? Thanks!

@alt-romes
Copy link
Copy Markdown
Collaborator

alt-romes commented May 4, 2026

I've opened haskell-debugger/dap#33 tracking the new dap release

@alt-romes
Copy link
Copy Markdown
Collaborator

alt-romes commented May 4, 2026

(Please add a descriptive commit message. It will help when looking at the log.)

(It should mention dap is a library now for instance)

Reviewing now.

Copy link
Copy Markdown
Collaborator

@alt-romes alt-romes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Comment thread haskell-debugger.cabal
Comment thread cabal.project Outdated
Comment thread hdb-dap/Development/Debug/Adapter/Init.hs Outdated
Comment thread haskell-debugger/GHC/Debugger/Session.hs
Comment thread haskell-debugger/GHC/Debugger/Session.hs Outdated
Comment thread hdb/Main.hs
Comment thread hdb/Main.hs
Comment thread haskell-debugger/GHC/Debugger/Monad.hs
Comment thread haskell-debugger/GHC/Debugger/Monad.hs
@Saizan Saizan force-pushed the abstract-hie branch 4 times, most recently from 1be7510 to b80f767 Compare May 5, 2026 10:02
@alt-romes
Copy link
Copy Markdown
Collaborator

@Saizan I've done the 0.6 dap release now: haskell-debugger/dap#33. Update this patch accordingly (drop the cabal.project thing)

- moved DAP-related code from executable `hdb` to public sublibrary
  `haskell-debugger:dap` so that runHDBServer can be imported in other packages.
- refactored runDebugger to take a "DebugRunner" function whose responsibility
  is to provide a Ghc session and a way to load the debugee home units.
- The in-memory:haskell-debugger-view unit is no longer compiled via `load`
  to avoid unloading the modules loaded by the DebugRunner. We rely on `compileOne` instead.
@Saizan
Copy link
Copy Markdown
Collaborator Author

Saizan commented May 5, 2026

@alt-romes done, good to merge?

@alt-romes
Copy link
Copy Markdown
Collaborator

Ye, land it!

@alt-romes alt-romes merged commit b32ada0 into master May 5, 2026
5 checks passed
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.

2 participants