-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Thousands of /tmp/rustdoctest* directories #139899
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
Comments
How do you run doctests and under which edition? Asking because we recently changed how we were running doctests so like that I know where to look at. |
@GuillaumeGomez I just run |
Ah. So I guess I'll check if rustc is using the old or new doctests soon enough. :) |
Problem is that if doctests fail, |
Fix opened in #140706. |
run_make test with |
Good idea! Gonna give it a try locally. |
cf. #138475 :D |
Nice! Can't wait to see what you'll come up with! |
Rollup merge of rust-lang#140706 - GuillaumeGomez:fix-missing-temp-dir-cleanup, r=notriddle [rustdoc] Ensure that temporary doctest folder is correctly removed even if doctests failed Fixes rust-lang#139899. The bug was due to the fact that if any doctest fails for any reason, we call `exit` (or it's called inside `libtest` if not edition 2024), meaning that `TempDir`'s destructor isn't called, and therefore the temporary folder isn't cleaned up. Took me a while to figure out how to reproduce but finally I was able to reproduce the bug with: `````rust #![doc(test(attr(deny(warnings))))] //! ``` //! let a = 12; //! ``` ````` And then I ensured that panicking doctests were cleaned up as well: `````rust //! ``` //! panic!(); //! ``` ````` And finally I checked if it was fixed for merged doctests too (`--edition 2024`). To make this work, I needed to add a new public function in `libtest` too which would call a function once all tests have been run. So only issue is: I have absolutely no idea how we can add a regression test for this fix. If anyone has an idea... r? `@notriddle`
While working on rustc, I often have:
😬
Almost all these directories are completely empty.
We should probably do a better job at cleaning them up. Or move them into the build directory instead of littering all over /tmp.
The text was updated successfully, but these errors were encountered: