Closed ryancannon88 closed 1 month ago
A run-long
job would be simple enough to add and wouldn't really add to the length or verbosit of the default bacon.toml file, as it would help shorten the comments of the run
job.
I'd like to avoid specifying jobs in cli arguments. For reuse or sharing, they need you to write scripts/makefiles so there's nothing gained.
@Canop Ok, if you don't mind I'd like to work on this so I can get some experience with this repo :)
You mean propose a run-long job in the defaul conf file ? You can make a PR, but this is just comments and won't get you much more experience.
@Canop Yes exactly. I know it's silly but I'd still like to do it.
I've been using cargo-watch to re-compile my web server as I iterate on it. I simply run
cargo watch -w src/ -x run
in my terminal.With Bacon, I must first add a
bacon.toml
file to the root of my project directory and then modify the run job in that file to the following:It took me a good amount of time to figure out this configuration was needed. I wonder if we can make long-running jobs easier to work with. I would guess that working with servers is a common use case. Ideally, no config file would be necessary, so end-users can simply run a command in the terminal.
Here are some options I have in mind:
background
andon_change_strategy
job fields set appropriately.bacon --list-jobs
. This means therun-long
job would look exactly the same as therun
job. We would need to add some information noting the difference between these two jobs.cargo watch -q -c -w src/ -x run
bacon run —background false —on-change-strategy kill-then-restart
bacon run —bg false —on-change kill
Thoughts?