Xcode 12.5 RC1 fails to resolve SPM dependency w/ Git LFS

I just downloaded the new Xcode 12.5 RC1 build and I believe I've found a new regression.

If your project depends on a SPM package that uses Git LFS, Xcode will now fail to clone the package and your project's package resolution step will fail.

I've made a trivial repro case, available here:
https://github.com/mthole/XcodeAndSpmLfsIssue

In the above case, my package depends on another "dummy" package which has a screenshot stored in it via LFS. This works fine in Xcode 12.4 and in Xcode 12.5 beta 3, but fails in Xcode 12.5 RC1.

The error in Xcode 12.5 RC1:

Code Block
Downloading Screen Shot 2021-04-22 at 11.04.55 AM.png (255 KB)
Error downloading object: Screen Shot 2021-04-22 at 11.04.55 AM.png (29c1070): Smudge error: Error downloading Screen Shot 2021-04-22 at 11.04.55 AM.png (29c10709f07bd2aad0aad6f65dab80b9bd8963c91ef5df6b00399b691a1cde09): error transferring "29c10709f07bd2aad0aad6f65dab80b9bd8963c91ef5df6b00399b691a1cde09": [0] remote missing object 29c10709f07bd2aad0aad6f65dab80b9bd8963c91ef5df6b00399b691a1cde09
Errors logged to /Users/mthole/Library/Developer/Xcode/DerivedData/XcodeAndSpmBugExample-fjigmzvqqryrzjajmyakiqsmwbdh/SourcePackages/checkouts/DummyPackageWithLFS/.git/lfs/logs/20210422T111110.295347.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: Screen Shot 2021-04-22 at 11.04.55 AM.png: smudge filter lfs failed

Replies

Filed FB9085841. I also see https://developer.apple.com/forums/thread/676670 which looks similar.
Hi @MichaelT, I am also facing this issue. Have you got any solution to this problem ?
In our case, the files stored through git-lfs are not used for the package we are building so running the following before is doing the trick
Code Block language
git config --global filter.lfs.required false