I'm poking around trying to find an answer to this problem still, as our
Package.resolved file looks good (per @SDGGiesbrecht 's recommendation on what to check into). I've also ensured that
Package.resolved is getting checked in properly. I'm at a loss on how to prevent this, and I'm not sure how the problem isn't more prevalent! I'm wondering if there's just something configured wrong on our end.
As @Srdan_Rasic mentions, it seems like this happens when Xcode attempts to update dependencies when we switch branches, which could be useful if the
.resolved file were different; however, Xcode is clearly disregarding the current status of the
.resolved file and attempting to do an update regardless of any changes, which is definitely not useful.
Currently, our options seem to be:
- Pin our dependency versions explicitly. This should fix things (unless there's another strange Xcode issue with SPM), but is terribly inconvenient for obvious reasons.
- Reset/revert the file changes when we don't want them, which is basically every time we switch branches. This is how we do it today. We switch branches, wait for Xcode to resolve packages, and check
git status to see if it updated stuff.
Anyone have any thoughts? Thanks in advance!