cargo-bisect-rustc icon indicating copy to clipboard operation
cargo-bisect-rustc copied to clipboard

bisecting broken: `Script returned error`

Open matthiaskrgr opened this issue 1 year ago • 5 comments

I have a script like

#!/bin/sh
! rustc /tmp/crash.rs  |& grep -Ii "query stack"

which returns 1 or 0 depending on whether rustc says "query stack" while processing a file.

When I try to run this after the update cargo-bisect-rustc --preserve --script=/home/matthias/vcs/github/rust_bisect/script.sh --test-dir=/home/matthias/vcs/github/rust_bisect/foo --start 2024-06-15 CBR just quits:

fetching https://static.rust-lang.org/dist/channel-rust-nightly-date.txt
nightly date: 10 B / 10 B [===========================================================================================================] 100.00 % 755.04 KB/s determined the latest nightly is 2024-06-23
checking the start range to find a passing nightly
installing nightly-2024-06-15
testing...
RESULT: nightly-2024-06-15, ===> Script returned error

ERROR: the start of the range (nightly-2024-06-15) must not reproduce the regression

cc @ehuss

cargo-bisect-rustc 0.6.9

matthiaskrgr avatar Jun 23 '24 05:06 matthiaskrgr

Can you say more about what the issue is? It looks like the start of your range is either failing to compile, or emitting the "query stack" message. What are the contents of crash.rs? What is the output with -vv?

ehuss avatar Jun 23 '24 15:06 ehuss

Ooh, did only the CBR output change? This looked like cbr could not proceed because of some error related to the script.

matthiaskrgr avatar Jun 23 '24 15:06 matthiaskrgr

Yea, instead of saying "Yes" or "No", it tells you what happened at each step.

ehuss avatar Jun 23 '24 15:06 ehuss

would be clearer if it would also say the exit code imo, something like Script returned error (exit code: 1)

matthiaskrgr avatar Jun 23 '24 15:06 matthiaskrgr

Yea, it would be nice to include the exit code. I'm not sure how difficult that will be since the code that renders the message may not have access to the exit code.

ehuss avatar Jun 24 '24 15:06 ehuss