Don't use cp -c if src and dst are on different devices when copying dSYMs#2766
Conversation
|
the manpage for cp says: is this not the case? it makes it sound like it shouldn't fail, but will fallback gracefully? i think in general we probably need to keep this optimization but figure out a fallback if it doesn't work. we do that in python like this rules_apple/tools/bundletool/bundletool_experimental.py Lines 232 to 235 in bb6da2c |
I see the confusion indeed; but looking at the clonefile() manual, it looks like
I'll update my patch |
|
Here is how rules_xcodeproj does it: |
cp -c if src and dst are on different devices when copying dSYMs
4bc6d4f to
1e8c9d4
Compare
dSYMs are currently copied using `cp -cp` on MacOS, which means MacOS will use clonefile(). While this optimizes speed and storage, this will also fail if src and dst are not on the same devices. We're fixing that by testing the device with `stat` before deciding how to copy.
1e8c9d4 to
5adc03a
Compare
dSYMs are currently copied using
cp -cpon MacOS, which means MacOS will use clonefile(). While this optimizes speed and storage, this will also fail if src and dst are not on the same filesystem. This will typically happen if the sandbox and bazel-out are on different filesystems.