Skip to content

[#271] Parametrize initDebugger to take GHC session rather than use HieBios#274

Draft
Saizan wants to merge 8 commits intomasterfrom
abstract-hie
Draft

[#271] Parametrize initDebugger to take GHC session rather than use HieBios#274
Saizan wants to merge 8 commits intomasterfrom
abstract-hie

Conversation

@Saizan
Copy link
Copy Markdown
Collaborator

@Saizan Saizan commented Apr 16, 2026

There are currently two issues:

  1. Understand the current interaction with HIE
  2. Figure out how much of the current runDebugger we can/want/should to delegate to ghc-worker.

@alt-romes I pushed a couple of questions as FIXMEs if you can take a look.

Also, RE 2, since ghc-worker is designed to compile one module at a time it has code that takes care of building the right home unit env.

This could mean we can drop a bunch of what's happening in runDebugger but then the code paths between using HIE and ghc-worker would differ significantly. If we think that'd become a maintenance headache we can also just take advantage of any EPS, ModuleGraph, ... already built, while keeping our own code to build the UnitEnv from Targets and DynFlags.

On the other hand it would probably scale better to let buck/the worker handle building the necessary modules? (Even if (at least some of) the modules need to be rebuilt with InsertBreakpoint and other debug specific flags.)

Either way I'm also trying to better understand what's going on in the UnitEnv/HscEnv, I'm thinking I need to serialize it to JSON in all its gory details to wrap my head around it.

@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 2 times, most recently from b676580 to 49961e8 Compare April 27, 2026 15:45
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