bacon
bacon copied to clipboard
Run job doesn't show output if there are any warnings
fn main() {
println!("Hello world!");
}
playground run pass!
Compiling playground v0.1.0 (/tmp/playground)
Finished dev [unoptimized + debuginfo] target(s) in 0.18s
Running `target/debug/playground`
Hello world!
fn main() {
let unused = 42;
println!("Hello world!");
}
playground run 1 warning
1 warning: unused variable: `unused`
--> src/main.rs:2:6
|
2 | let unused = 42;
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
|
= note: `#[warn(unused_variables)]` on by default
Hello World! isn't shown in the second case.
Any updates?
Any updates?
I had just forgotten this issue, sorry.
This should be fixed on branch fix-issue-81 : the job takes a new "allow_warnings" setting.
More tests are needed before I merge into main. I'd appreciate your tests.
Hi! I'm new to the rust game and I've been using bacon to work on my first project. I'm also experiencing this issue and switching to the branch fix-issue-81 fixed it for me! It worked both with the default .toml file and with a project-specific bacon.toml file. I cloned and built Bacon for release from within a common repos folder and then executed it with ../bacon/target/release/bacon. Worked perfectly!
I tried the branch with the example given above, but it doesn't print hello world.
warning: unused variable: `unused` ▐
--> src/main.rs:2:6 ▐
| ▐
2 | let unused = 42; ▐
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused` ▐
| ▐
= note: `#[warn(unused_variables)]` on by default ▐
▐
warning: `loltest` (bin "loltest") generated 1 warning ▐
Finished dev [unoptimized + debuginfo] target(s) in 0.00s ▐
Running `target/debug/loltest`
println!("Hello world!\n"); works, however.
It seems like the last line is swallowed.
It would also be nice if there was an option to scroll to the end automatically on every update. It would be useful when doing iterative development that's based on program output.
It also seems non-zero exit code inhibits output as well. Seeing panic/crash output is very important. Otherwise, users are forced to leave bacon and rerun to see panic output.
Now that you mention it, the last line is being swallowed for me too. I didn't notice because my code has a ton of output
Hum. I can't reproduce the last line being swallowed :
There are sometimes synchronization problem since the switch to tokio so that might be another occurence.
I also have the panic:

I'll merge this and we'll create other issues for the last line being swallowed if confirmed.