Added --repl and --no-server and changed behavior of -i/--interactive for #926 #927
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.
This adds
--repl
and--no-server
as options, and makes-i
with no targets produce a warning message.--repl
starts a build REPL, but fails if a target is given--no-server
fails unless targets are given-i
/--interactive
is the same as--no-server
, but emits a warning and starts a build REPL if no targets are givenGiving any of these arguments as the first option on the command-line causes
mill.MillMain
to run (interactive mode). Giving none of them as the first argument causesmill.client.MillClientMain
to run. It is an error to give more than one of these options.The only possible undesirable feature is that It is now possible to give one of these options more than once, with the first occurrence being as the first argument and another occurrence later in the switches. The "these switches have to be first" error is now emitted based on whether interactive mode is active when one of these switches are present. It would be possible to change the code to disallow any repeats if that's unacceptable.