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

'probe' does not work under Miri #46

Closed
RalfJung opened this issue Jul 24, 2022 · 3 comments
Closed

'probe' does not work under Miri #46

RalfJung opened this issue Jul 24, 2022 · 3 comments

Comments

@RalfJung
Copy link

When autocfg is used in the build script of a cargo miri test invocation, it recently stopped working.

It used to work because the RUSTC env variable was unset, and so autocfg bypassed Miri and queried the rustc binary, which usually is pretty much in sync with the miri binary that actually does all the building and running here, but there is no guarantee of that. It basically used to work by chance.

Since recently (to fix some other issues), RUSTC is now set to the miri binary. And now autocfg does not work any more. I don't quite know what fails yet -- looks like autocfg suppresses all rustc output, so I'll need to work with a patched autocfg to debug any of this (or if you have better ways of debugging autocfg that'd be great to know :). But it might be that the best way to fix this is to make autocfg aware of Miri and adjust its behavior.

@RalfJung
Copy link
Author

Ah, turns out we can make this work from the Miri side, so autocfg doesn't need to change anything. :)

@cuviper
Copy link
Owner

cuviper commented Jul 25, 2022

looks like autocfg suppresses all rustc output

FWIW, that's Cargo suppressing all build script output, unless it's -vv double-verbose. But users in #30/#32 want to suppress all output more directly, and I haven't decided how I feel about that... (though you could say inaction is a form of decision too)

@RalfJung
Copy link
Author

RalfJung commented Jul 25, 2022

Yeah I saw that output. :) (though I think I only passed -v, maybe it's because I made the build script fail that it showed the output with less verbosity) It was quite crucial in debugging this. Now autocfg even works when using Miri with a foreign target, thanks to all the TARGET logic you have in place. :D And we have it on CI, so it should not break again.

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

2 participants