So my REPL workflow involves sending code to the Julia REPL to be evaluated into the running environment. This is in contrast to typing code into the REPL manually.
Unfortunately if there’s an
import SomePackage statement (or
using) contained in the sent code, the Julia REPL will automatically download, install, and compile any missing packages without prompt.
There is supposed to be a prompt, but the prompt was designed so that a newline is interpreted as yes, and for yes to be the default selection. Because
import statements are often followed by newlines in code, evaluating sent code will skip right through the prompt to download, install and compile any missing packages.
First, I don’t think it’s a good idea to have yes be the default answer to installation and compilation of arbitrary libraries, let alone newline.
But second, while sending a code block is an “interactive” action, the evaluation of a code block itself should not be. Any imports of missing packages should fail with errors under those conditions. Is there some way to modulate the behaviour of the REPL so that it does not expect user prompts while evaluating blocks of code?