-
Notifications
You must be signed in to change notification settings - Fork 10
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
cargo clean
can't delete out\cxxbridge\crate\wasm-opt-cxx-sys on Windows
#116
Comments
I have reproduced this on my own CI on windows 2019: https://github.com/brson/wasm-opt-rs/actions/runs/3447794546/jobs/5754178052 Simply running I originally suspected this was an interaction between windows file system semantics and the specific structure of the substrate build in the linked PR, but that does not seem to be the case. Edit: this was also with the old Rust 1.48 toolchain, not a recent toolchain. |
I could not reproduce this locally on windows 10 running cargo clean by hand. Perhaps there is a timing factor here. |
I've also verified this happens on CI windows 2019 with Rust stable: https://github.com/brson/wasm-opt-rs/actions/runs/3447938335/jobs/5754469499 So it's not related to an old cargo. Still can't reproduce locally. |
cc @dtolnay I can't investigate much deeper yet, but maybe the issue will be obvious to you. After running the build on GitHub actions, on either Windows 2019 or Windows 2022, I don't see the same behavior locally on Windows 10. This is a symlink so maybe there's something special about the GitHub windows environment's handling of symlinks. |
Tried deleting with https://docs.rs/remove_dir_all/0.7.0/remove_dir_all/fn.remove_dir_all.html (after reading rust-lang/rust#29497), but still hit the same issue 😕 |
If it's just a symlink, would you be able to try a plain I'd also note that CI does have special file scanners etc so it's possible they're preventing delete in some way. If that's the case retrying (after a delay) may work. |
When I tested this I did try throwing some sleeps into the script, like Edit: Er the way I wrote this with This is actually what I tested:
|
I used a third-party |
I think this is probably an issue with cargo. I created a wee app that simply calls |
@ChrisDenton thank you very much for the investigation. That is a fascinating result. |
As another input/example, this same issue just started happening in the builds of
Ref: https://github.com/stellar/soroban-tools/actions/runs/5275255477/jobs/9540530625?pr=699 |
My apologies. I thought this had been already fixed in cargo, and was maybe recurring, but I see it was merged only 2 weeks ago, so not in 1.70.0. My output above adds nothing to the data above already. |
@leighmcculloch Is your example reliably reproducible? Does it happen with nightly cargo? |
We've just encountered the same behaviour of the |
So looks like it was fixed upstream? |
The fix seems to be coming in version 1.80. |
I have hit following error in CI: https://github.com/subspace/subspace/actions/runs/3434067151/jobs/5725766740
All that code does is
cargo clean
. On Linux I see that that location is a symbolic link, still it doesn't make much sense to me why it can't be removed. I need that to essentially work around #115The text was updated successfully, but these errors were encountered: