Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15262] SwiftPM 5.5 Fails to resolve dependencies #4385

Closed
Mordil opened this issue Sep 30, 2021 · 10 comments
Closed

[SR-15262] SwiftPM 5.5 Fails to resolve dependencies #4385

Mordil opened this issue Sep 30, 2021 · 10 comments
Labels

Comments

@Mordil
Copy link

Mordil commented Sep 30, 2021

Previous ID SR-15262
Radar rdar://problem/83703829
Original Reporter @Mordil
Type Bug
Status Closed
Resolution Cannot Reproduce
Environment

swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Target: x86_64-apple-macosx11.0

macOS 11.4
Mac mini (2018)
Memory 8gb
CPU 3.6 GHz Quad-core Intel i3

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 587840783e23602723f5ec4c441a8b6f

Issue Description:

When trying to work on Vapor/Redis, SwiftPM fails to resolve dependencies.

When running swift package resolve, or through Xcode, SwiftPM fails to resolve dependencies using Swift 5.5 (release), but this happened even with beta builds.

The error message is repeated for each dependency in the graph

Creating working copy for https://github.com/vapor/async-kit.git
https://github.com/vapor/async-kit.git: error: Failed to clone repository https://github.com/vapor/async-kit.git:
    Cloning into '/Users/nathanharris/dev/vapor/redis/.build/checkouts/async-kit'...
    fatal: invalid branch name: init.defaultBranch = 

I've deleted Xcode's DerivedData, as well as the .build folder within the project directory.

Still receive the same error

@Mordil
Copy link
Author

Mordil commented Sep 30, 2021

As an observation: I only encountered this issue with every Xcode 13 beta, except the first one on my Macbook Pro. The Xcode 13 RC fixed this issue on my MBP.

However, for my mac mini, no version of Xcode 13 is working for me.

@ktoso
Copy link
Member

ktoso commented Sep 30, 2021

Very weird, thank you for the report!

@ktoso
Copy link
Member

ktoso commented Sep 30, 2021

@swift-ci create

@Mordil
Copy link
Author

Mordil commented Sep 30, 2021

I updated my Mac mini to 11.6 to see if Xcode 13 RC 1 would work with that version, and I'm getting the same issue.

@Mordil
Copy link
Author

Mordil commented Sep 30, 2021

Interestingly, when trying to resolve dependencies for RediStack, only a single error is reported by SwiftPM for the SwiftServiceDiscovery package:

https://github.com/apple/swift-service-discovery: error: Failed to clone repository https://github.com/apple/swift-service-discovery:
    Cloning into '/Users/nathanharris/dev/mordil/RediStack/.build/checkouts/swift-service-discovery'...
    fatal: invalid branch name: init.defaultBranch = 

However, when trying to resolve Vapor/Redis, practically the entire dependency graph throws the same error

@neonichu
Copy link
Member

neonichu commented Oct 4, 2021

Cannot repro this, could you please try deleting your SwiftPM cache? It is located at `~/Library/Caches/org.swift.swiftpm`.

@Mordil
Copy link
Author

Mordil commented Oct 4, 2021

@neonichu Does Xcode not do this when using File > Swift Packages > Reset Package Caches?

@Kyle-Ye
Copy link
Collaborator

Kyle-Ye commented Dec 3, 2021

> Does Xcode not do this when using File > Swift Packages > Reset Package Caches?
@Mordil No, it seems only clean the derivedData related cache.

@Kyle-Ye
Copy link
Collaborator

Kyle-Ye commented Dec 3, 2021

I can't reproduce it with the latest Xcode both from Xcode or SPM.

Swift version: Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
Target: arm64-apple-macosx12.0
Unix version: Darwin 21.2.0 Darwin Kernel Version 21.2.0: Tue Nov 16 23:24:18 PST 2021; root:xnu-8019.61.4~4/RELEASE_ARM64_T8101 arm64 arm;
macOS version: 12.1
Xcode-select path: '/Applications/Xcode.app/Contents/Developer'
Xcode: Xcode 13.1 (Build version 13A1030d)

@Mordil
Copy link
Author

Mordil commented Dec 3, 2021

Deleting the cache seems to resolve this. This is why newly cloned projects don't reproduce this

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants