Repository navigation
Description
Summary
Since 3.8.0, Package.swift declares an internal target named Logging. apple/swift-log's library target is also named Logging, and SwiftPM requires target names to be unique across the package graph. Any app whose dependency graph contains swift-log can no longer resolve packages after upgrading to 3.8.0.
xcodebuild: error: Could not resolve package dependencies:
multiple packages ('ios-client', 'swift-log') declare targets with a conflicting name: 'Logging'; target names need to be unique across the package graph
swift-log is a very common transitive dependency. For example:
- CocoaLumberjack 3.9.0 and 3.10.0 depend on swift-log for its
CocoaLumberjackSwiftLogBackendproduct. Its target counts toward the conflict even when the app doesn't link that product. - Kitura Swift-JWT 4.0.0 → LoggerAPI → swift-log.
This blocks us from taking 3.8.0, which has the HTTP request leak fix (#846). 3.7.x keeps every finished DefaultHttpDataRequest in HttpRequestList for the life of the app.
Steps to reproduce
Minimal package:
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "Repro",
platforms: [.iOS(.v15)],
dependencies: [
.package(url: "https://github.com/splitio/ios-client.git", exact: "3.8.0"),
.package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", exact: "3.9.0"),
],
targets: [
.target(name: "Repro", dependencies: [
.product(name: "Split", package: "ios-client"),
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
]),
]
)Running swift build or xcodebuild -resolvePackageDependencies -scheme Repro on it (or adding both packages to an Xcode project) fails with the error above. The same setup with 3.7.1 resolves.
Workaround attempted
SwiftPM module aliasing (.product(name: "Split", package: "ios-client", moduleAliases: ["Logging": "SplitLogging"])) avoids the conflict in small projects. In a larger Xcode project graph (Xcode 27.1, Swift 6.4), though, resolution fails nondeterministically: the same graph passes on some runs and fails on others with:
module alias for target 'Logging', declared in package '<wrapper>', does not match any recursive target dependency of product 'Split' from package 'ios-client'
So aliasing isn't a reliable workaround. It also has to be declared from a wrapper Package.swift, because an Xcode project can't declare aliases.
Suggested fix
Rename the internal targets to SDK-prefixed names, e.g. Logging → SplitLogging. The other new generic names (Http, Concurrency, Streaming, Tracker, BackoffCounter, PeriodicRecorderWorker) have the same exposure, since any of them can collide with another package's target. A prefix such as Split* for all of them would prevent future conflicts.
Environment
- Split iOS SDK 3.8.0 (also present on
master) - Xcode 27.1, Swift 6.4, iOS 15.0 deployment target
- Swift Package Manager integration
Activity
gthea commentedon Nov 10, 2026
Hi @mshehan, thanks for the detailed report. We'll take a look.
gthea commentedon Nov 11, 2026
This has been fixed in
3.8.1.