I have a question about a dependency that cannot be resolved correctly by the SPM. The situation is as follows:
App => Vapor@3.0.0... => Console-Kit@3.0.0... => email@example.com... => LogModel@master => swift-log@master
I wanted to use the levels of swift-log in my LogModel. But for this
Logger.Level must conform to
Codable and so I opened the Pull Request which got merged. However, no version
firstname.lastname@example.org was created for this (which I totally understand), so the dependency conflict described above has now occurred.
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "Backend", products: [ .library(name: "Backend", targets: ["App"]), ], dependencies: [ .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), // just for the minimal example, otherwise email@example.com... => firstname.lastname@example.org... => email@example.com... .package(url: "https://github.com/PDF-Archiver/LogModel.git", .branch("master")) ], targets: [ .target(name: "App", dependencies: ["Logging", "LogModel"]), .testTarget(name: "AppTests", dependencies: ["App"]) ] )
swift package update leads to the following error:
Updating https://github.com/PDF-Archiver/LogModel.git Updating https://github.com/apple/swift-log.git error: the package dependency graph could not be resolved; possibly because of these requirements: https://github.com/apple/swift-log.git @ 1.0.0..<2.0.0
I can understand that this configuration leads to a conflict. However, I want to ask if there is a solution. For example the forcing a specific dependency (here: "swift-log@master"). Because I think that this is a quite common scenario in the „OpenSource World“ and I could not find a solution for it.
Can anyone help me out with this problem?