You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The multi-crate testing is very easy to use, while it's also tempting to reuse the auxiliary modules. It seems this could lead race issue. One aux crate could be truncated by another parallel test runner compiling the same aux module.
We need document the restriction, or detect and fail with a good message, or even better, supports module reuse.
I thought there was already an open bug on this but I couldn't find it. I too have encountered this problem and I have two ideas for how to fix this:
The easiest is probably to create a separate output directory for each test that uses aux-build. This seems good because it isolates the tests from one another. It would also allow multiple tests to perform the same aux-build without any problem.
Alternatively, we could have a process tasked with performing aux-builds: each test task would send a message requesting that the aux-build be performed and then await the response. The central task would then check whether the aux-build is not started / has already been done / is in progress / . In the first case, it can spawn a task to perform the aux-build. In the second case, it can respond immediately. In the third case, it can add the test task to a "notify list" and wait until the ongoing compilation finishes.
The latter is more optimal for text execution time but seems rather more complex and fails to isolate the tests, so I am leaning towards the former.
Activity
nikomatsakis commentedon Apr 8, 2012
I thought there was already an open bug on this but I couldn't find it. I too have encountered this problem and I have two ideas for how to fix this:
The latter is more optimal for text execution time but seems rather more complex and fails to isolate the tests, so I am leaning towards the former.
lht commentedon Apr 9, 2012
I also like for the first solution. The auxiliary crates are small, should not cost too much execution time.
lht commentedon Apr 10, 2012
Assign to myself. I have some local tests for re-exports best to be included after this is implemented.
Auto merge of rust-lang#2162 - RalfJung:rustup, r=RalfJung
Prevent printing when `--quiet` is used (rust-lang#2162)
Rework the driver docs (rust-lang#2162)
Rework the driver docs (rust-lang#2162)
Merge pull request rust-lang#2162 from davidtwco/intrinsic-data-updat…
Merge rust-lang#2162