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

Allow users to re-run watched scripts by pressing enter #1232

merged 1 commit into from
Dec 3, 2021


Copy link

@lihaoyi lihaoyi commented Dec 3, 2021

Now a user can do two things during --watch: either Ctrl-C to exit, or Enter to re-run. This is the first step in supporting the same functionality in Mill com-lihaoyi/mill#490.

I also incorporated some of the upstream improvements in the Mill implementation of def watchAndWait, which we should be able to largely replace with the original except for an override wrapping the original in the two setIdle calls.

The nested functions were getting messy, so moved some of them out into separate helpers

Tested manually by running ./mill -i amm[2.12.10].run -w x 1 true on a dummy script, verified that pressing Enter causes it to re-run while pressing other things doesn't

Review by @lefou @alexarchambault

Copy link

@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.

Great. Looks good to me!

@lihaoyi lihaoyi merged commit 5cdec75 into com-lihaoyi:master Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants