-
Notifications
You must be signed in to change notification settings - Fork 360
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
miri test is painful to use with CARGO_TARGET_DIR set #1311
Comments
@jonhoo thanks for bringing this up! I assume this would also solve the problem where I have to (For another target-dir issue that for some reason you do not run into, it seems, see japaric/xargo#286.) |
Yes, exactly! It looks like RLS' code for dealing with this lives somewhere around here: https://github.com/rust-lang/rls/blob/1cfb87845f45758442830506b7242947dfc989d9/rls/src/build/cargo.rs#L668-LL686 Huh, yes, I have had nothing that looks like that issue, and I've been using |
One simple option might be to use |
I think maybe you'll need to add support to |
FWIW as I've mentioned in #1421 (comment) This is because I have some logs
Not very clean though because I also have Happy to run some pipelines if you suggest something. |
I have
CARGO_TARGET_DIR
set on my machine to shared the target directories of the many rust projects on my computer. This generally works very well, and reduces build times (often by a lot!) by re-using build artifacts across crates I'm working on. Unfortunately,miri test
also shares that build directory, and when it re-compiles crates with a modifiedstd
, it causes non-miri builds to fail with errors like:This is solved easily enough by remembering to always run miri test with:
$ env -u CARGO_TARGET_DIR cargo miri test
But, well, I often forget, and then have to wipe my whole shared target directory, which leads to very long compile times the next time I work on a large project.
I wonder if it might be possible to have
miri
use it's own "build profile".rls
already does this (its artifacts ends up withtarget/rls
), and if miri also did that (target/miri
), all of these issues would simply go away! I don't know what mechanisms would be involved, but it would save me (and probably others) a lot of headache by eliminating the error above :)The text was updated successfully, but these errors were encountered: