When I add a specific dependency to my Package.swift (https://github.com/hectr/swift-http-client.git) file, SPM stops working (It cannot resolve package dependencies):
$ swift package resolve Fatal error: 'try!' expression unexpectedly raised an error: TSCBasic.GraphError.unexpectedCycle: file /Library/Caches/com.apple.xbs/Sources/swiftpm/swiftpm-16074/Sources/Workspace/Workspace.swift, line 1112 zsh: illegal hardware instruction swift package resolve
I attempted to use the dependency using a tag, the branch name and a local folder in my machine, but the outcome was the same. Renaming the library didn't help either.
The minimal Package.swift file that reproduces the crash is this:
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "Package", platforms: [ .iOS(.v10), ], products: , dependencies: [ .package(url: "https://github.com/hectr/swift-http-client.git", .branch("master")), ], targets: , swiftLanguageVersions: [.v5] )
I have already reported this issue as a bug: https://bugs.swift.org/browse/SR-12482
Does anyone know what can I do differently to avoid this problem?