-
Notifications
You must be signed in to change notification settings - Fork 13.3k
build_helper: try to rename dir before delete #140091
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
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
dd18b56
to
605af72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this is worth a shot. I measured bootstrap build time diff on dev-desktop between introducing fastrand
(this PR) and master:
- This PR w/
fastrand
: 22.41s - b8005bf w/out
fastrand
: 22.02s
Approximately 1.77% increase, but absolute time diff wise seems okay.
@bors r+ rollup |
If fastrand does end up being a problem then I could probably hack something together using |
I don't think it's a significant enough impact to warrant hand-rolling, it's fine. |
build_helper: try to rename dir before delete This is aimed at working around "failed to remove and recreate output directory" errors in CI. Mostly coming from https://github.com/rust-lang/rust/blob/49e5e4e3a5610c240a717cb99003a5d5d3356679/src/tools/compiletest/src/runtest.rs#L1515-L1516 Essentially we want to create a new empty directory but an old directory with the same name exists. Ideally we'd remove the old directory but renaming it has (more or less) the same effect. Maybe a better strategy would be to use unique directory names to start with but I fear that will be a more invasive change. r? jieyouxu
Rollup of 12 pull requests Successful merges: - rust-lang#134213 (Stabilize `naked_functions`) - rust-lang#139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - rust-lang#139981 (Don't compute name of associated item if it's an RPITIT) - rust-lang#140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - rust-lang#140047 (remove a couple clones) - rust-lang#140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - rust-lang#140074 (rustdoc-json: Improve test for auto-trait impls) - rust-lang#140076 (jsondocck: Require command is at start of line) - rust-lang#140077 (Construct OutputType using macro and print [=FILENAME] help info) - rust-lang#140081 (Update `libc` to 0.2.172) - rust-lang#140091 (build_helper: try to rename dir before delete) - rust-lang#140107 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Hm, this is in a rollup now but I do wonder if this should be reverted if the underlying issue gets fixed. Because this could potentially hide a real issue. |
Cancelled the rollup since it's only 1 hour in, let's instead try #140120 |
It's safe to close this then! |
This is aimed at working around "failed to remove and recreate output directory" errors in CI. Mostly coming from
rust/src/tools/compiletest/src/runtest.rs
Lines 1515 to 1516 in 49e5e4e
Essentially we want to create a new empty directory but an old directory with the same name exists. Ideally we'd remove the old directory but renaming it has (more or less) the same effect. Maybe a better strategy would be to use unique directory names to start with but I fear that will be a more invasive change.
r? jieyouxu