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

[SR-10302] Raise incompatible dependencies when adding SwiftPM itself #4867

Open
swift-ci opened this issue Apr 4, 2019 · 0 comments
Open
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Apr 4, 2019

Previous ID SR-10302
Radar None
Original Reporter giginet (JIRA User)
Type Bug
Environment

Apple LLVM version 10.0.1 (clang-1001.0.46.3)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: cf8c7788a98ce4e934490ad92be71493

Issue Description:

In case some packages depend on packages which contain non semver tag. (like `DEVELOPMENT-SNAPSHOT-2019-03-04-a`).
When other packages depend on the package, it raises the following error.

error: the package AnotherPackage @ 1.0.0 contains incompatible dependencies:

SwiftPM can't treat non semver tags well.
You can avoid this problem using `.exact` instead of another operator.

It means SwiftPM can't treat itself well as dependencies.

let package = Package(name: "SomePackage",
    products: [
        .library(name: "SomePackage", targets: ["SomePackage"]),
    ],
    dependencies: [
        .package(url: "https://github.com/apple/swift-package-manager.git", .revision("swift-DEVELOPMENT-SNAPSHOT-2019-03-04-a")),
    ]
)
let package = Package(name: "AnotherPackage",
    products: [
        .library(name: "AnotherPackage", targets: ["AnotherPackage"]),
    ],
    dependencies: [
        .package(url: "SomePackage.git", .exact("1.0.0")),
    ]
)
$ cd AnotherPackage
$ swift build
error: the package AnotherPackage @ 1.0.0 contains incompatible dependencies:
swift-package-manager[https://github.com/apple/swift-package-manager.git] @ swift-DEVELOPMENT-SNAPSHOT-2019-03-04-a
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants