-
Notifications
You must be signed in to change notification settings - Fork 349
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
Some way to pass Miri flags without MIRIFLAGS? #2051
Comments
Is there not a way to pass an additional parameter explicitly to cargo binaries when they're invoked? Or is it mainly just that we want Miri to be able to seamlessly pass args through to From a usability standpoint I think it might be slightly nicer to have an explicit |
That would make it |
It's entirely unambiguous and unlikely to cause any kind of collision, and it's about the same (+2-3 chars) as the current de facto of |
I was comparing that with |
It would be best if this was supported by |
Hm, that makes sense but I have even less of an idea for how to support that without reimplementing all the cargo flags logic.^^ |
After digging a bit I think it'd have to be a request for rust-lang/cargo itself 😕 |
We could have a |
Could you open a separate issue for that? I think in this one I would like to track passing flags "ah-hoc" for a particular invocation. |
Filed #2347 for .cargo/config.toml, since I want it as well for |
one option would be the form |
We now also have "--many-seeds", which is passed after "test".
|
@Gankra points out that the recommended way to pass flags to Miri --
MIRIFLAGS=-Zmiri-strict-provenance cargo miri test
-- does not work on Windows. Also I have to admit this style of flag passing is somewhat verbose.Is there a way we can pass flags via the CLI while also still being compatible with all
cargo test
invocations? One suggestion is to "grab" all flags starting with-Zmiri
before cargo even sees then, and populateMIRIFLAGS
with that. This could break in some corner cases (like when a feature is called-Zmiri-me
and someone callscargo miri test --feature -Zmiri-me
), but that seems very unlikely. This does also assume cargo will never have a-Z
flag starting withmiri
, which sounds like a reasonable assumption. Then we could docargo miri test -Zmiri-strict-provenance
, which works on Windows and looks nicer even on non-Windows.The text was updated successfully, but these errors were encountered: