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.
We need to set up proper automatic testing for the REPL, including testing of the various commands and with the basis library loaded...
Also, there are a number of ways in which the REPL can crash (or get into an unfortunate state), including (1) entering the expression
Posix.Process.fork()
at toplevel, (2) entering the expressionOS.FileSys.chDir ".."
, or (3) reloading an mlb-file after changing some of the source files it refers to. There seem to be no way (in general) to guard against the user doing stupid things like (1) above or by entering(OS.Process.exit 0 : int)
, or deleting theMLB
directory that holds temporary files for the REPL. Problem (2) above we can fix, however. Problem (3) is difficult to solve and we will not make an attempt to solve (3) here, but we will make support for resetting the child process by adding a:reset
command. To do something about (3), we first need to detect changes to loaded target code and changes to assumed bases.Progress:
:set
command.:reset
command for respawning the child process.Repl.c
so thatOS.FileSys.chDir
does not confuse the REPL.