I want to add packages like SnapKit, Resolver, etc. Actually, it doesn't matter what package I want to add - the same result. Even adding a local package. Here is an error error: Couldn't get a list of tags. Unexpectadly did not find the new dependency in the package graph: sourceControl(identity: snapkit, location: SwiftPM.SPMPackageDependency.SourceControlLocation.remote(SwiftPM.SPMSourceControlURL(sourceControlURL: https://github.com/SnapKit/SnapKit.git)), requirement: 5.7.1 – Next Major)
Steps that didn't help:
rm -rf ~/Library/Developer/Xcode/DerivedData,
rm -rf ~/Library/Caches/org.swift.swiftpm
,xcodebuild -resolvePackageDependencies -disablePackageRepositoryCache
,git config --global tag.forcesignannotated false
,swift package update
Xcode 16.1 macOS 15.1 (Intel Core i7) iOS 18.0
It's an issue related to SourceTree. In version 4.2.9, they added a setting to the .gitconfig
file that's breaking SPM.
More info here: https://jira.atlassian.com/browse/SRCTREE-8176