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

Is there a way to tell bacon to run all jobs? #42

Open
emilk opened this issue Feb 17, 2021 · 13 comments
Open

Is there a way to tell bacon to run all jobs? #42

emilk opened this issue Feb 17, 2021 · 13 comments

Comments

@emilk
Copy link

emilk commented Feb 17, 2021

I have several jobs in my bacon.toml and I'd like to run them all. I could open a terminal for each job, but that is tedious.

Is it possible to tell bacon to run all my jobs?

@dbeckwith
Copy link

I would like this as well, it would be nice to be able to just run bacon and have it run all jobs at once.

@Canop
Copy link
Owner

Canop commented Jun 16, 2021

You mean in sequence ? One after the other one and stopping at the first one with things to say ? Can you give an example of the involved jobs ?

@dbeckwith
Copy link

I meant more running them in parallel, like in separate tabs. But now I realize that just opening separate terminal tabs and running multiple bacons is probably the best way to do that.

@Canop
Copy link
Owner

Canop commented Jun 16, 2021

I often have 2 parallel bacon terminals, when I want some code to be checked with separate targets or features, mostly for cross compilation, but I never need more.
When you run bacon test, it effectively does the bacon check too: the tests will be ran if there's no error.
That's why I ask about your use case, to understand why you'd need "all jobs".

@dbeckwith
Copy link

I have separate ones for cargo test and cargo clippy, since I think cargo test doesn't run clippy lints. Separate terminals seems to work fine for me though.

@Canop
Copy link
Owner

Canop commented Jun 16, 2021

I could define a way to chain jobs, like bacon test+clippy where clippy is ran if there's no failing test.

@dbeckwith
Copy link

That's actually similar to my usual workflow where I'd use cargo watch to run clippy then test, which worked well because if clippy failed with a compiler error then there's no need to try to run test. So far, I'm liking bacon's output for clippy much better, so I'm using it for that, but I still want the full output for test so I'm still running that under cargo watch.

@Canop
Copy link
Owner

Canop commented Jun 16, 2021

If something relevant is missing from bacon test, another issue might help.

@bestouff
Copy link

Ditto, running test and clippy in the same term would be a space saver.

@bestouff
Copy link

Another, maybe simpler idea: how about adding a job for cargo checkmate ? This would run all "interesting" jobs in one pass.

@Canop
Copy link
Owner

Canop commented Feb 13, 2022

I think bacon 2 makes this issue obsolete.

I'll keep the issue open til the release of bacon 2, though, and then it can still be discussed.

@Canop Canop closed this as completed in 77cee44 Feb 16, 2022
@max-sixty
Copy link

I'm just discovering Bacon — so far, it's really brilliant. I had been building my own things with watchexec & Taskfile when this does exactly what I want and is really fast.

Allowing multiple jobs is a feature that would be great — for example I'd like to see clippy lints, but also run tests.

Having them either consecutive or in parallel would be broadly equivalent, since cargo locks the build cache, which takes most of the time.

Until then, I'm just running multiple runs of Bacon — it's fine, though means folks have to learn which things to run; ideally we could give a standard bacon from our project, and it would launch the jobs we recommend running.

@wmmc88
Copy link

wmmc88 commented Jul 25, 2023

I think bacon 2 makes this issue obsolete.

I'll keep the issue open til the release of bacon 2, though, and then it can still be discussed.

What feature in v2 made this issue obsolete? My usecase is to be able to watch both tests and clippy output at the same time. Right now, it seems to require needing to hit c and t to toggle between which one is running, or requires running two instances of bacon in seperate terminals. Am i missing something here?

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

No branches or pull requests

6 participants