-
-
Notifications
You must be signed in to change notification settings - Fork 69
CACHEDIR.TAG not created for some *-apple-darwin
targets
#165
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
*-apple-darwin
targets
I'm not sure why it's not created because eventually it's cargo driving the build, Nothing obvious I can do here. |
But the issue exists, can be reliably reproduced, has real consequences (in my case, macOS CI builds not being cached), and looks somehow specific to cargo-zigbuild, since regular equivalent cargo calls work as expected. I can try investigating a bit more on my free time, but I really think the issue should stay open in the meantime |
Sure, we can open it if you want to investigate. Do note that I'll close it again if nothing comes up after a month or two. |
I found the culprit: Lines 749 to 777 in 0c4827b
Before invoking I don't exactly know how one would fix this, but I can confirm commenting the last two lines is enough to fix the issue |
Thanks, see also rust-lang/cargo#12441. |
Cargo creates
CACHEDIR.TAG
files in some directories of thetarget/
folder, so that they are marked as excluded for backups. This is also used by theSwatinem/rust-cache
action to know if the directory should be kept for cache or notTurns out, for some reason with
*-apple-darwin
targets (at least),cargo-zigbuild
doesn't create such a file.Repo:
Create an empty bin crate:
It works as expected with
cargo build
on theaarch64-apple-darwin
target:It doesn't with
cargo zigbuild
on theaarch64-apple-darwin
target:But it works with some targets:
This is affecting me because it means macOS builds are not properly cached in my CI, with a combination of
cargo-zigbuild
andSwatinem/rust-cache
.Note that the host target seems irrelevant, I tried both from a Linux host and a macOS host, and it affects AFAIK the
aarch64-apple-darwin
and thex86_64-apple-darwin
targetsThe text was updated successfully, but these errors were encountered: