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

Rework Sys.exit for eval #10642

Merged
merged 2 commits into from
Mar 26, 2022
Merged

Rework Sys.exit for eval #10642

merged 2 commits into from
Mar 26, 2022

Conversation

Simn
Copy link
Member

@Simn Simn commented Mar 25, 2022

I've always hated how a Sys.exit(0) when running the interpreter would cause an error on the compilation server. This change addresses this by always throwing the Sys_exit exception, but making sure to properly catch it in compiler.ml. compile_ctx now returns the exit code, and HighLevel.entry keeps going (in case of --next) as long as the exit code is 0. Finally, it calls comm.exit, which does a legit exit in the stdio version and nothing in the pipe version (context error state is set by catch_completion_and_exit).

@Simn Simn merged commit de4896f into development Mar 26, 2022
@Simn Simn deleted the eval_sys_exit branch March 26, 2022 07:01
@skial skial mentioned this pull request Mar 30, 2022
1 task
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.

1 participant