-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Implement a basic watch command #760
Conversation
This adds the following command ``` aiken watch ``` There are some open questions to answer, though: - I really like the ergonomics of `aiken watch`; but it also makes sense as a flag to `aiken check` or `aiken build` etc.; should we just support the flag, the command, or both? - Right now I duplicated the with_project method, because it forces process::exit(1); Should we refactor this, and if so, how? - Are there other configuration options we want?
(related to #589) |
Sick. I kinda like the idea of passing down a flag from check and build BUT watch command is also cool and we could optionally add --build to watch instead. So either way is probably fine. |
Yea; and fmt also makes some sense, and with the flags they could compose. I'm open to anything, but I really like the simplicity of |
Rather than have this logic in the aiken binary, this provides a generic mechanism to do "something" on file change events. KtorZ is going to handle wiring it up to the CLI in the best way for the project. I tried to write some tests for this, but it's hard to isolate the watcher logic without wrestling with the borrow checker, or overly neutering this utility.
After discussing with @KtorZ, I pulled the "file watch and debounce" logic purely into it's own utility in aiken-project; He's going to handle integrating this into the CLI in a way that best fits for the project. |
Feel free to do this differently, I just implemented it because i'm actually using it heh
Merged in c2725ab |
This adds the following command
There are some open questions to answer, though:
aiken watch
; but it also makes senseas a flag to
aiken check
oraiken build
etc.; should we justsupport the flag, the command, or both?
process::exit(1)
; Should we refactor this, and if so, how?