Open swift-ci opened 5 years ago
@aciidb0mb3r here's a one-line repro:
rm -rf /tmp/{Speedster,GitHubKit} && cd /tmp && git clone https://github.com/Einstore/GitHubKit && git clone https://github.com/Einstore/Speedster.git && cd Speedster && git reset --hard d06f228cdcd866d51b5f31e8d4fe7197ac88286f && sed -i '' 's#https://github.com/Einstore/GitHubKit.git", from: "1.0.0"#../GitHubKit", .branch("master")#g' Package.swift && swift build
Changing the dependency from from: "1.0.0"
to .branch("master")
seems necessary to trigger the issue.
Weirdly though, if it failed once, it'll fail again, even if you put from: "1.0.0"
back. Oddly even after rm -rf .build Package.resolved
...
@swift-ci create
The root cause here is that the project pulls in a dependency on “https://github.com/vapor/jobs.git” and “https://github.com/vapor/jobs-redis-driver.git” which have been renamed to “https://github.com/vapor/queues.git” and “https://github.com/vapor/queues-redis-driver.git” respectively, and “https://github.com/vapor/queues-redis-driver.git” is pulling “https://github.com/vapor/queues.git”.
Since both “https://github.com/vapor/jobs.git” and “https://github.com/vapor/queues.git” resolve to the same repo, the name in the manifest is the same which is tripping the logic in SwiftPM that filters duplicate manifests, resulting in a non-resolvable graph.
The original error message (“the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again”) is of course misleading and was fixed (in another radar) to include information about the problematic dependencies (in this case https://github.com/vapor/queues.git)
We also looking to change the logic in SwiftPM so it filters manifest based on identity (url based for now) instead of name which should improve the experience by giving more actionable errors like missing products or duplicate products
Comment by Jason Wray (JIRA)
Tom's improvements should be available in the Xcode 12.5 betas and Swift 5.4 development snapshot toolchains — please give those a try and let us know if this isn't resolved. Thanks!
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 5be4cc4f9548adbad0d6d1262b52526cIssue Description:
After upgrading to Catalina beta 6 and Xcode beta 6 I am no longer able to use SPM on my project although it seems the graph gets resolved.
The result is an un-actionable error ` the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again`
I have tried to delete the resolved file as well as .build, .swiftpm and the whole of derived data with no luck between tests.
It is currently happening on the latest commit of our project here:
https://github.com/Einstore/Speedster/commit/d06f228cdcd866d51b5f31e8d4fe7197ac88286f
Edit: I have tried to reference a local package at one point after after installing Xcode 11 beta 6 which would fit scenario described in https://bugs.swift.org/browse/SR-11032 but had since removed that and the issue persists so assume this problem might not be related.
The normal build log looks like this:
In xcode I get (with dependencies being fetched multiple times and all of them showing in the left column as resolved but with no schema generated and the same error from Package loading action):
(screenshot attached)
I have also been suggested to use a new resolver (of which I don't know much about) which gave me: