-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Same run, Different ouputs #1854
Comments
This is actually intentional because Cargo is running the compiler in parallel behind the scenes. For more info see this comment: #1717 (comment) |
hmmm... If so, this is actually an issue! I know everybody is working hard on developing Cargo and making it a top level tool, but this kind of output behavior + your answer can scare people out and make them loose confidence about the way Cargo and Rust are developped. Resolution patterns : I haven't done any research about that, but I'm pretty sure we can find other implementations to solve this concurrent ouput issue. |
Ok, seems reasonable to consider the symptom solvable without not parallelizing. |
MsBuild solves this problem by numbering the "node/thread/compiler" instances. So you'll see something like 1> foo.cpp |
Ah I think this is a dupe of #1198 which is also about interleaving output |
What I do
Trying to
cargo test
against some codeWhat I got
Don't freak out the underlying error is coherent and is exactly the same :)
BUT
The ouput may appear broken like if two threads are writing to stdout at the same time, so the output variants appear to be infinite like these :
Note: No code change or anything between the runs. Just re-exec
build test
This messes up understanding, indicators and maybe colors...
What I expected
What I end up with on some runs :
How to reproduce
The code used for the code samples of this issue (generating these errors) is available here : https://gist.github.com/frntn/e9e5652c12fdc931315d
Ubuntu 14.04.2 LTS
rustc 1.1.0 (35ceea399 2015-06-19)
cargo 0.2.0-nightly (a483581 2015-05-14) (built 2015-05-15)
The text was updated successfully, but these errors were encountered: