Open kadanes opened 2 years ago
@parthv21 could you share the package resolution log when it fails?
Confirmed that the repository exists at the specified path. Error got resolved after hitting Reset Package Caches
Error while fetching remote repository
file:///path/to/local/copy/PackageName.git/: The repository could not be found. Make sure a valid repository exists at the specified location and try again.
thanks @parthv21 are the dependences local (file://...) or remote (https://...)? could you share the complete Xcode dependencies resolution log? if you prefer to share that privately you can file through https://feedbackassistant.apple.com/
@tomerd the dependencies are cached locally so it is a file://...
path. I will grab a complete log. I shared the failure logs in my comment above.
We just ran into a situation where we were seeing a similar, seemingly intermittent error. We traced it to a machine in our CI environment, which had a Homebrew installation of git that was being killed (sig 9) by the system when called from the package manager. The resolution mentioned here worked. We didn't investigate much further but it seemed the level of logging from the package manager was not sufficient to show what was happening (that the problem was less "couldn't clone because can't find the repo" and more "couldn't clone because git is getting killed").
I think the whole interface between SPM and git could use some more robust logging.
Description
I work on the Amazon Flex delivery app. We use SPM with over 100 different packages, made by different teams. We have a couple of issues with SPM related to package resolution and build times. We had a discussion with Apple engineers David and Artem during WWDC22 open hour lab. They asked us to open issues with SPM for the issues we are seeing.
Expected behavior
Package resolution should succeed on first attempt when a new workspace is launched.
Actual behavior
Package resolution fails on a random package each time our app workspace is launched. The issue gets resolved after I click on
File
>Packages
>Reset Package Caches
/Resolve Package Versions
.Steps to reproduce
For an app with complex dependency graph, launch a fresh workspace and package resolution fails. It will succeed on a retry.
Swift Package Manager version/commit hash
SPM 5.6
Swift & OS version (output of
swift --version && uname -a
)