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

Can't use package with SPM #17

Closed
nkleemann opened this issue Jun 2, 2019 · 8 comments
Closed

Can't use package with SPM #17

nkleemann opened this issue Jun 2, 2019 · 8 comments

Comments

@nkleemann
Copy link
Contributor

Hey Adam,

I'm trying to test your package in a minimal setup. I added it as required in my Package.swift:

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

import PackageDescription

let package = Package(
    name: "WebMidiKitTest",
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(url: "https://github.com/adamnemecek/WebMIDIKit.git", majorVersion: 1)
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "WebMidiKitTest",
            dependencies: ["WebMIDIKit"]),
        .testTarget(
            name: "WebMidiKitTestTests",
            dependencies: ["WebMidiKitTest"]),
    ]
)

But when I run swift build I get the following error message:

/Users/nik/proj/IDEs/Xcode/WebMidiKitTest: error: manifest parse error(s):
/Users/nik/proj/IDEs/Xcode/WebMidiKitTest/Package.swift:11:10: error: ambiguous reference to member 'package'
        .package(url: "https://github.com/adamnemecek/WebMIDIKit.git", majorVersion: 1)

I tried changing majorVersion: 1 to from: "1.0.0" which seems to atleast conform to the function signature but this gave the following error:

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

Dependencies:
    https://github.com/adamnemecek/WebMIDIKit.git @ 1.0.0..<2.0.0

Can you help me out here? Really depend on your library for a generative music project, thanks :)

@adamnemecek
Copy link
Owner

I'm out until tomorrow night. I'll take a look tomorrow or on Wednesday.

@nkleemann
Copy link
Contributor Author

Do you have any updates on this?

@bensinlukt
Copy link

Same issue here.

@nkleemann
Copy link
Contributor Author

Trying to use this package by using Xcode 11's new SPM integration, similar error message:

The package dependency graph can not be resolved; unable find any available tag for the following requirements:

https://github.com/adamnemecek/WebMIDIKit.git — 1.0.5..<2.0.0

If you have no time for fixing this yourself can you at least give us a hint so we can try to fix it ourselves?

@adamnemecek
Copy link
Owner

My spm skills are really rusty. I guess try forking it and updating the tag version?

@nkleemann
Copy link
Contributor Author

The format of your Package.swift file was deprecated since Swift 4 - after fixing this I could add this package with Xcode 11 by selecting "branch: master" instead of "version: 1.0.5".

Fixed in my fork 🙂

@adamnemecek
Copy link
Owner

You can create a pull request

@nkleemann
Copy link
Contributor Author

Done

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

No branches or pull requests

3 participants