-
-
Notifications
You must be signed in to change notification settings - Fork 633
Open
Description
In case of building a fat binary it fails with duplicate key found error
error: duplicate key found: 'ID(moduleName: "SourceryExecutable", packageIdentity: sourcery, buildTriple: PackageGraph.BuildTriple.destination)'
Prerequisites
Xcode 16.2, macOS Sequoia 15.4, MacBook Pro M2 Max 32 GB
Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx13.0
Steps to reproduce
- Create empty directory
mkdir sourcery-duplicate-key-found && cd $_
- Initialize a sample SPM project
swift package init
- Add Sourcery as a dependency
swift package add-dependency https://github.com/krzysztofzablocki/Sourcery.git --exact 2.2.6
- Build milti-arch binary
swift build --arch arm64 --arch x86_64
Expected result
Building for debugging...
[6/6] Compiling sourcery_duplicate_key_found sourcery_duplicate_key_found.swift
Build complete! (4.17s)
Actual result
error: duplicate key found: 'ID(moduleName: "SourceryExecutable", packageIdentity: sourcery, buildTriple: PackageGraph.BuildTriple.destination)'
Solution
Probably, this issue could be resolved by removing this line:
Line 279 in 3359554
.executable(name: "sourcery", targets: ["SourceryExecutable"]), |
however, I believe that there are better solution
BarredEwe
Metadata
Metadata
Assignees
Labels
No labels