Xcode suddenly can not get Swift package revision: "Couldn't get revision"

Viewed 1518

I opened a project in Xcode that relies on RxSwift which is included as a Swift package through the builtin Swift package manager. It worked fine a couple of week ago when I created the project.

Now all of a sudden, when trying to build and run my project, I get an error message about that Swift package:

Couldn’t get revision ‘6.5.0^{commit}’

I tried a clean of the build folder, but would still get the same error.

My internet connection is working fine, so it's not a network issue.

I am also surprised that Xcode would try to get the revision again since no update of the package in question, RxSwift was released between the time building last worked fine and today. So I would assume that whatever is cached locally should still be there and functional.

So far I could not find any other reports about this error message.

1 Answers

Apparently, something was wrong with the package cache.

An update of Xcode or a cleaning tool I run on my Mac which deletes some caches might have confused Xcode's package cache.

In Xcode, click Packages -> Reset Package Caches and then build again.
If that does not do it, clean the build folder as well and try again.

Related