Closed
Description
Let me explain the order of operations I went through:
- Run
cargo miri test
. Realise there are no backtraces. - I try again with
env RUST_BACKTRACE=1 cargo miri test
. - This still doesn't work. I double-check the output and I get this little nugget:
note: in Miri, you may have to set `-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
env RUST_BACKTRACE=1 cargo miri test -Zmiri-env-forward=RUST_BACKTRACE
-
error: unknown `-Z` flag specified: miri-env-forward For available unstable features, see https://doc.rust-lang.org/nightly/cargo/reference/unstable.html If you intended to use an unstable rustc feature, try setting `RUSTFLAGS="-Zmiri-env-forward"
env RUST_BACKTRACE=1 RUSTFLAGS=-Zmiri-env-forward=RUST_BACKTRACE cargo miri test
- Still doesn't work. At this point, I have to search for
-Zmiri-env-forward
and ultimately stumble on the readme for this repo mentioning I should useMIRIFLAGS
, notRUSTFLAGS
.
This is… very frustrating. Not to mention I have a particularly large test suite I was running this on, and miri was running all tests by default, and it was quite slow between each step. It would be nice if any of the following applied:
RUST_BACKTRACE
was just special and always passed to miri, at least viacargo miri
.cargo miri
accepted-Z
flags to be passed directly to miri.- The comment mentioning
RUST_BACKTRACE=1
just explicitly saidRUST_BACKTRACE=1 MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE
.
This could potentially also be a cargo change, but since this message is being generated by miri itself, I figured I'd start here first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels