Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully exit when ghci exits #95

Merged

Conversation

9999years
Copy link
Member

Note that this won't gracefully exit until a reload is triggered, though.

@linear
Copy link

linear bot commented Sep 21, 2023

DUX-1385 Error when underlying process was killed

I got this output:

[6641 of 6641] Compiling TestMain         ( test/TestMain.hs, interpreted ) [EnumsSpecTest changed]
Ok, 6641 modules loaded.

Error: cabal: repl failed for lib:test-dev from mwb-0. The build process was
killed (i.e. SIGKILL). The typical reason for this is that there is not enough
memory available (e.g. the OS killed a process using lots of memory).

• Adding new modules to ghci:
  • /home/matt/Projects/.../Handler.hs

ErrorHook { error: Handler { ctx: "action worker", err: "  \u{1b}[31m×\u{1b}[0m Broken pipe (os error 32)\n" }, critical: OnceCell(Uninit) }

It's unclear that we should just boot-loop here.

@9999years
Copy link
Member Author

9999years commented Sep 21, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@9999years 9999years force-pushed the rebeccat/dux-1257-ghcid-ng-breaks-with-custom-prompt-in-ghci branch from b8a1525 to 949420f Compare September 22, 2023 22:05
@9999years 9999years force-pushed the rebeccat/dux-1385-error-when-underlying-process-was-killed branch from 86122e3 to dbe4a9d Compare September 22, 2023 22:05
@9999years 9999years mentioned this pull request Sep 22, 2023
@9999years 9999years force-pushed the rebeccat/dux-1257-ghcid-ng-breaks-with-custom-prompt-in-ghci branch from 949420f to 0c2e98d Compare September 25, 2023 17:38
@9999years 9999years force-pushed the rebeccat/dux-1385-error-when-underlying-process-was-killed branch from dbe4a9d to 62bc7bf Compare September 25, 2023 17:38
@9999years 9999years added the patch Bug fixes or non-functional changes label Sep 25, 2023
@9999years 9999years force-pushed the rebeccat/dux-1257-ghcid-ng-breaks-with-custom-prompt-in-ghci branch from 0c2e98d to b9b6674 Compare September 25, 2023 21:59
@9999years 9999years force-pushed the rebeccat/dux-1385-error-when-underlying-process-was-killed branch from 62bc7bf to e3224f3 Compare September 25, 2023 21:59
Gabriella439
Gabriella439 previously approved these changes Sep 25, 2023
Copy link
Contributor

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

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

What sort of thing tends to cause ghci to fail and hit this code path? The reason I'm asking is to see if it's worth restarting ghci instead of gracefully exiting, but what you have already looks good to me.

@9999years
Copy link
Member Author

@Gabriella439 It's in the Linear ticket. Matt hit an OOM or something:

[6641 of 6641] Compiling TestMain         ( test/TestMain.hs, interpreted ) [EnumsSpecTest changed]
Ok, 6641 modules loaded.

Error: cabal: repl failed for lib:test-dev from mwb-0. The build process was
killed (i.e. SIGKILL). The typical reason for this is that there is not enough
memory available (e.g. the OS killed a process using lots of memory).

• Adding new modules to ghci:
  • /home/matt/Projects/.../Handler.hs

ErrorHook { error: Handler { ctx: "action worker", err: "  \u{1b}[31m×\u{1b}[0m Broken pipe (os error 32)\n" }, critical: OnceCell(Uninit) }

@Gabriella439
Copy link
Contributor

ah yeah in that case you probably wouldnt be able to recover by restarting

@9999years 9999years force-pushed the rebeccat/dux-1385-error-when-underlying-process-was-killed branch from e3224f3 to b522b4e Compare September 26, 2023 23:27
@9999years 9999years changed the base branch from rebeccat/dux-1257-ghcid-ng-breaks-with-custom-prompt-in-ghci to main September 26, 2023 23:27
@9999years 9999years dismissed Gabriella439’s stale review September 26, 2023 23:27

The base branch was changed.

@9999years 9999years merged commit 9fd7595 into main Sep 28, 2023
@9999years 9999years deleted the rebeccat/dux-1385-error-when-underlying-process-was-killed branch September 28, 2023 01:13
@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Bug fixes or non-functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants