I am the author and maintainer of the Swift package Saga, which comes with an example app. Since pretty recently I am getting two warnings in Xcode about the way the dependencies are set up, and I am not sure how to solve this. The warnings:
'sagaswimrenderer' dependency on 'https://github.com/loopwerk/Saga.git' conflicts with dependency on '/Users/kevin/Workspace/Saga/Saga' which has the same identity 'saga'. this will be escalated to an error in future versions of SwiftPM.
'sagaparsleymarkdownreader' dependency on 'https://github.com/loopwerk/Saga.git' conflicts with dependency on '/Users/kevin/Workspace/Saga/Saga' which has the same identity 'saga'. this will be escalated to an error in future versions of SwiftPM.
This is the Package.swift file for the example app:
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "Example",
platforms: [
.macOS(.v12)
],
dependencies: [
.package(path: "../"),
.package(url: "https://github.com/loopwerk/SagaParsleyMarkdownReader", from: "0.5.0"),
.package(url: "https://github.com/loopwerk/SagaSwimRenderer", from: "0.6.1"),
],
targets: [
.executableTarget(
name: "Example",
dependencies: [
"Saga",
"SagaParsleyMarkdownReader",
"SagaSwimRenderer"
]
),
]
)
So it depends on the local version of Saga, and on actual released versions of SagaParsleyMarkdownReader and SagaSwimRenderer. But those two packages also depend on Saga, and that's what's causing the warnings.
I don't know how else to set up the example app so I don't get these warnings. I could rely on the released version of Saga, but that makes local development a LOT harder (I use the example app to work on features and bugfixes in Saga). SagaParsleyMarkdownReader and SagaSwimRenderer simply have to depend on Saga as they use code defined within Saga.
This used to work without warnings, and it continues to function just fine, but since the warnings says this will become an error in a future version of SwiftPM I need to find a solution.