[Fix #299] Be more specific about what hdb brings in scope.#306
[Fix #299] Be more specific about what hdb brings in scope.#306
Conversation
|
And we can only run REPL evaluation when we're stopped somewhere, so there's always a consistent answer for "what's in scope":
Great! |
|
Should the test introduced #293 be marked as successful now? |
b80f767 to
bb2ef8f
Compare
eac0326 to
913b90a
Compare
dc554f3 to
06a686b
Compare
|
@alt-romes I'm finding that we also need the scope of where we are stopped for |
|
@alt-romes sorry, spoke too soon, I can trigger the getStackTrace problem on master with smaller imports: issue #310 , testcase #311 . |
06a686b to
46e47dc
Compare
|
Let me know once ready to review! |
93ecfb2 to
b7d9b68
Compare
|
@alt-romes I believe it's ready now |
alt-romes
left a comment
There was a problem hiding this comment.
only fully qualified names are accepted.
Hmm. Well, that's a tradeoff. I think it's fair, especially if everything is more natural (ie it's obvious what the context is - the breakpoint context - rather than a complicated magic context with implicit things)
At the start of a session we import the exported symbols of:
- Prelude
- loaded Debug View modules
- debugeee home units module
what do you mean by the third item in this list? I thought you changed it so we only have Prelude and the DebugView instances.
Could you also say in the commit message which ticket the commit fixes, if any? Here it's #299. This is important when I'm writing the changelog.
Overall: Looks good, but I have a few questions. I'm glad you understand all of these tricky bits now!
At the start of a session we import: - exported symbols from Prelude - instances from loaded Debug View modules - instances from debugeee home units modules (we were importing their inner scope before). The latter two are so DebugView orphans are in scope. During an eval, if stopped at a breakpoint, we also import the inner scope of the breakpoint module. Imports made by the user at the REPL are as before: preserved across stops, only for exported symbols.
9f84251 to
b03ba78
Compare
|
Land it! Great work. |
Turns out if we are careful, and cheat about package names, we can actually import home units with IIDecl.
This makes it now possible to tailor the scope to be the one inside the Module of the breakpoint we are stopped at, as wished in #299.
:add modulecommand at debug repl #312) Extend debug session REPL with command to explicitly IIModule import some module?