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

Using SPM results in a "dependency graph is unresolvable" error. #3470

Closed
1 task done
sbromberger opened this issue May 25, 2018 · 2 comments
Closed
1 task done

Using SPM results in a "dependency graph is unresolvable" error. #3470

sbromberger opened this issue May 25, 2018 · 2 comments

Comments

@sbromberger
Copy link

What did you do?

Following #2950, I added

dependencies: [
   .package(url: "https://github.com/danielgindi/Charts.git", from: "3.1.1")
]

to a brand-new Package.swift created by swift package init, and attempted to download the dependency and build the project using swift build.

What did you expect to happen?

I expected swift build to succeed.

What happened instead?

I received the following output:

Updating https://github.com/danielgindi/Charts.git
error: dependency graph is unresolvable; found these conflicting requirements:

Dependencies: 
    https://github.com/danielgindi/Charts.git @ 3.1.1..<4.0.0

Charts Environment

Charts version/Branch/Commit Number:
n/a (trying to use 3.1.1)

Xcode version:
9.3 (9E145)
Swift version:
4.1.1
Platform(s) running Charts:
MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports)
macOS version running Xcode:
MacOS High Sierra (10.13.4)

Demo Project

Here's the full Package.swift:

// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "ChartTest",
    products: [
        .library(
            name: "ChartTest",
            targets: ["ChartTest"]),
    ],
    dependencies: [
        .package(url: "https://github.com/danielgindi/Charts.git", from: "3.1.1")
    ],
    targets: [
        .target(
            name: "ChartTest",
            dependencies: ["Charts"]),
        .testTarget(
            name: "ChartTestTests",
            dependencies: ["ChartTest"]),
    ]
)
@liuxuan30
Copy link
Member

any swift pkg expert could help? Not sure it's about our issue.

@pmairoldi
Copy link
Collaborator

pmairoldi commented Jul 29, 2018

The v in our tags is the problem. I just pushed a rename of the latest release as 3.1.1 instead of v3.1.1. Seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants