Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Swift Package Manager installation is failing. #224

Closed
zorn opened this issue Sep 23, 2016 · 2 comments
Closed

Swift Package Manager installation is failing. #224

zorn opened this issue Sep 23, 2016 · 2 comments

Comments

@zorn
Copy link
Contributor

zorn commented Sep 23, 2016

I tried to add Freddy to a simple Hello World Swift Package Manager app (first time playing with it). My Package.swift file:

import PackageDescription

let package = Package(
    name: "Hello",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/bignerdranch/Freddy.git", majorVersion: 3),
    ]
)

When I ran swift build I got:

$ swift build
Cloning https://github.com/bignerdranch/Freddy.git
HEAD is now at c2780e5 Merge pull request #218 from bignerdranch/swift3
Resolved version: 3.0.0
Empty manifest file is not supported anymore. Use `swift package init` to autogenerate.
error: The package at `/Users/zorn/Desktop/Hello/Packages/Freddy.git' has no Package.swift for the specific version: 3.0.0

Looks like we need to populate Package.swift with info now.

@zorn
Copy link
Contributor Author

zorn commented Sep 23, 2016

Seems like this is fixed in PR #223. Sadly I don't see a way to request a specific branch in an actual dependency so I don't know how to help verify this fixes the issue without merging into master.

https://github.com/apple/swift-package-manager/blob/master/Documentation/Reference.md#package-dependency

@mdmathias
Copy link
Contributor

For the sake of documentation:

There is a now a release tagged as 3.0.1. Your Package.swift should like this to make use of it:

import PackageDescription

let package = Package(
    name: "Hello",
    dependencies: [
        .Package(url: "https://github.com/bignerdranch/Freddy.git", Version(3,0,1)),
    ]
)

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

No branches or pull requests

2 participants