[#271] Parametrize initDebugger to take GHC session rather than use HieBios#274
Draft
[#271] Parametrize initDebugger to take GHC session rather than use HieBios#274
Conversation
Collaborator
cb45ff9 to
12fb0d5
Compare
b676580 to
49961e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are currently two issues:
@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
runDebuggerbut 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
InsertBreakpointand 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.