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

Added --repl and --no-server and changed behavior of -i/--interactive for #926 #927

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

hypatian
Copy link
Contributor

@hypatian hypatian commented Jun 27, 2020

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 given

Giving 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 causes mill.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.

@lihaoyi
Copy link
Member

lihaoyi commented Jun 27, 2020

i think this looks reasonable

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@lefou lefou merged commit 825d0ba into com-lihaoyi:master Jun 29, 2020
@lefou
Copy link
Member

lefou commented Jun 29, 2020

Thank you!

@lefou lefou added this to the after 0.7.3 milestone Jun 29, 2020
@hypatian hypatian deleted the GH-926 branch July 4, 2020 04:57
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.

None yet

3 participants