In 1.36.0, cargo no longer excludes directories in target from Time Machine backups on macOS machines (see #3884).
To reproduce: Delete the target directory for some project, and run a build. Run xattr -r target and note that there is no attribute com.apple.metadata:com_apple_backup_excludeItem applied to any subdirectories (if nothing has any extended attributes, it will not print anything.) Try the same with a prior version such as 1.35.0, and it will apply that attribute to subdirectories of target.
This regression seems to have been introduced in 8258ca4 -- from what I can tell (and it's entirely possible that I'm completely misreading the situation!), the issue is that the directory that is to be excluded from backups upon creation is actually not created in Layout::prepare as might be expected -- it winds up being created earlier, in Layout::at, when it calls open_rw on the flock::Filesystem. Reverting that change would fix the problem, but I hope there might be a more elegant way to fix it that still maintains the spirit of that change (not updating that bit of metadata every time!)
In 1.36.0, cargo no longer excludes directories in
targetfrom Time Machine backups on macOS machines (see #3884).To reproduce: Delete the
targetdirectory for some project, and run a build. Runxattr -r targetand note that there is no attributecom.apple.metadata:com_apple_backup_excludeItemapplied to any subdirectories (if nothing has any extended attributes, it will not print anything.) Try the same with a prior version such as 1.35.0, and it will apply that attribute to subdirectories oftarget.This regression seems to have been introduced in 8258ca4 -- from what I can tell (and it's entirely possible that I'm completely misreading the situation!), the issue is that the directory that is to be excluded from backups upon creation is actually not created in
Layout::prepareas might be expected -- it winds up being created earlier, inLayout::at, when it callsopen_rwon theflock::Filesystem. Reverting that change would fix the problem, but I hope there might be a more elegant way to fix it that still maintains the spirit of that change (not updating that bit of metadata every time!)