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

Failed to resolve dependencies Dependencies could not be resolved because no versions #313

Open
diuming opened this issue Sep 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@diuming
Copy link

diuming commented Sep 7, 2023

My
Xcode version 14.3.1
Swift version 5.8.1
Package.swift

// swift-tools-version: 5.8
.
.
.
dependencies: [
    .package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.1.0"))
]
.
.
targets: [
        .target(
            name: "MyProject",
            dependencies: [.product(name: "Collections", package: "swift-collections")]
        )
]
.

Showing Recent Messages
Failed to resolve dependencies Dependencies could not be resolved because no versions of 'swift-collections' match the requirement 1.1.0..<1.2.0 and root depends on 'swift-collections' 1.1.0..<1.2.0.

@diuming diuming added the bug Something isn't working label Sep 7, 2023
@lorentey
Copy link
Member

lorentey commented Oct 4, 2023

We do not have a 1.1.0 release tagged yet; the repository's current default branch is downstream from the 1.1 release branch, so the README is documenting a setup that isn't live yet.

To use Swift Collections as a dependency, you need to set your expected version number to one of the existing release tags, as in .upToNextMinor(from: "1.0.5").

(To test unreleased features, you can also use a branch-based spec such as .branch("release/1.1"), or .branch("main") -- however, such specifications should never be used in production, as these development branches are, by definition, unstable: things can arbitrarily change, break or get removed from these branches, without notice.)

I'll see if I can switch the default branch to release/1.0. Failing that, it'd likely be best to change the README on main back to recommend the 1.0 versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants