Skip to content

[Fix #242] Bring Interactive Imports in scope after resumeExec#275

Merged
alt-romes merged 1 commit into
masterfrom
issue242
Apr 20, 2026
Merged

[Fix #242] Bring Interactive Imports in scope after resumeExec#275
alt-romes merged 1 commit into
masterfrom
issue242

Conversation

@Saizan
Copy link
Copy Markdown
Collaborator

@Saizan Saizan commented Apr 20, 2026

Turns out the culprit for #242 was resumeExec resetting the scope to the one before the last break, with no care for consistency with the ic_imports field.

That also means we can just setContext again with the saved imports to get our scope right.

@Saizan Saizan requested a review from alt-romes April 20, 2026 08:59
@Saizan Saizan changed the base branch from master to ghc-debugger-259 April 20, 2026 08:59
@Saizan
Copy link
Copy Markdown
Collaborator Author

Saizan commented Apr 20, 2026

I think this could probably be cherry-picked onto master without conflicts if it makes more sense

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.

Great finding!! I think the wording could just be improved because I couldn't follow it very clearly

resumeExec :: GhcMonad m => SingleStep -> Maybe Int -> m ExecResult
resumeExec a b = do
v <- GHC.resumeExec a b
-- resumeExec resets the scope of the IC to what it was before the last
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's unclear if you're referring to GHC's behavior or our new overwritten behavior

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, this comment is a bit confusing because this distinction isn't clear

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@alt-romes should be better now

@alt-romes
Copy link
Copy Markdown
Collaborator

Could you make this MR against master? I agree

@Saizan Saizan changed the base branch from ghc-debugger-259 to master April 20, 2026 13:06
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.

Much better! Could you rebase on master and discard all commits except the top-most? I can help you if it's not clear how to do that.

Basically, make the MR just to merge that last commit to master

@alt-romes alt-romes merged commit 1d66952 into master Apr 20, 2026
13 of 15 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