Projects that use remote swift packages and custom configurations are not compiling. The frameworks that depend on the remote packages can't find them.
Getting warnings about configuration mismatches and then module not found errors from import statements. I'm migrating an existing project over that uses custom configs and didn't have this import issue there.
Existing xcodegen
project.yml
name: asdf
attributes:
ORGANIZATIONNAME: asdf
options:
bundleIdPrefix: com.adsf
createIntermediateGroups: true
transitivelyLinkDependencies: true
deploymentTarget:
iOS: "16.0"
watchOS: "8.0"
configs:
Development: debug
Nightly: release
Production: release
templates.yml
targetTemplates:
Library:
type: framework
platform: iOS
configFiles:
Development: configs/development.xcconfig
Nightly: configs/nightly.xcconfig
Production: configs/production.xcconfig
info:
path: "modules/${target_name}/Sources/Info.plist"
sources:
- "modules/${target_name}/Sources"
Here is a sample project that fails
Project.swift
let project = Project(
name: "TestBug",
settings: .settings(configurations: [
.debug(name: "Development"),
.release(name: "Nightly"),
.release(name: "Production"),
]),
targets: [
.target(
name: "Utils",
destinations: .iOS,
product: .framework,
bundleId: "com.mycompany.myapp.utils",
infoPlist: .default,
sources: ["Modules/Utils/Sources/**"],
dependencies: [
.external(name: "Dependencies")
]
),
]
)
Package.swift
// swift-tools-version: 6.0
import PackageDescription
#if TUIST
import struct ProjectDescription.PackageSettings
let packageSettings = PackageSettings(
productTypes: [:]
)
#endif
let package = Package(
name: "TestBug",
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-dependencies", .upToNextMajor(from: "1.6.0")),
]
)
If you try to compile you just get
❌ /Users/billy/workspace/TestTuist/Modules/Utils/Sources/DateProvider.swift:1:8: no such module 'Dependencies'
It does compile if you remove
settings: .settings(configurations: [
.debug(name: "Development"),
.release(name: "Nightly"),
.release(name: "Production"),
]),
Full project attached below
TestTuist 2.zip
tuist build --generate
Loading and constructing the graph
It might take a while if the cache is empty
Using cache binaries for the following targets:
Generating workspace TestBug.xcworkspace
Generating project xctest-dynamic-overlay
Generating project combine-schedulers
Generating project swift-dependencies
Generating project swift-clocks
Generating project TestBug
Generating project swift-concurrency-extras
Building scheme Utils
⚠️ --- xcodebuild: Using the first of multiple matching destinations:
[Utils] Write Auxiliary File module.modulemap
[Utils] Write Auxiliary File Utils.hmap
[Dependencies] Write Auxiliary File module.modulemap
[Dependencies] Write Auxiliary File Dependencies.SwiftFileList
[Dependencies] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Dependencies] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Dependencies] Write Auxiliary File Dependencies_const_extract_protocols.json
[XCTestDynamicOverlay] Write Auxiliary File module.modulemap
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay.DependencyMetadataFileList
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay.SwiftFileList
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay_const_extract_protocols.json
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay.LinkFileList
[XCTestDynamicOverlay] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay_const_extract_protocols.json
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay.SwiftFileList
[XCTestDynamicOverlay] Write Auxiliary File XCTestDynamicOverlay-OutputFileMap.json
[XCTestDynamicOverlay] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Utils] Write Auxiliary File Utils.DependencyMetadataFileList
[Utils] Write Auxiliary File Utils-project-headers.hmap
[Utils] Write Auxiliary File Utils-own-target-headers.hmap
[Utils] Write Auxiliary File Utils-generated-files.hmap
[Utils] Write Auxiliary File Utils-all-target-headers.hmap
[Utils] Write Auxiliary File Utils-all-non-framework-target-headers.hmap
[Utils] Write Auxiliary File Utils_const_extract_protocols.json
[Utils] Write Auxiliary File Utils.SwiftFileList
[Utils] Write Auxiliary File Utils.SwiftConstValuesFileList
[Utils] Write Auxiliary File Utils.LinkFileList
[Utils] Write Auxiliary File Utils-OutputFileMap.json
[Utils] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Utils] Write Auxiliary File Utils_vers.c
[IssueReporting] Write Auxiliary File module.modulemap
[IssueReporting] Write Auxiliary File IssueReporting_const_extract_protocols.json
[IssueReporting] Write Auxiliary File IssueReporting.SwiftFileList
[IssueReporting] Write Auxiliary File IssueReporting.LinkFileList
[IssueReporting] Write Auxiliary File IssueReporting-OutputFileMap.json
[IssueReporting] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[IssueReporting] Write Auxiliary File IssueReporting.SwiftFileList
[IssueReporting] Write Auxiliary File IssueReporting.LinkFileList
[IssueReporting] Write Auxiliary File IssueReporting_const_extract_protocols.json
[IssueReporting] Write Auxiliary File IssueReporting-OutputFileMap.json
[IssueReporting] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[IssueReporting] Write Auxiliary File IssueReporting.DependencyMetadataFileList
[IssueReporting] Write Auxiliary File IssueReporting_vers.c
[Dependencies] Write Auxiliary File Dependencies-OutputFileMap.json
[Dependencies] Write Auxiliary File Dependencies_const_extract_protocols.json
[Dependencies] Write Auxiliary File Dependencies.SwiftFileList
[Dependencies] Write Auxiliary File Dependencies.LinkFileList
[Dependencies] Write Auxiliary File Dependencies-OutputFileMap.json
[Dependencies] Write Auxiliary File Dependencies.DependencyMetadataFileList
[Dependencies] Write Auxiliary File Dependencies_vers.c
[ConcurrencyExtras] Write Auxiliary File module.modulemap
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras.SwiftFileList
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras_const_extract_protocols.json
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras.LinkFileList
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras-OutputFileMap.json
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras_const_extract_protocols.json
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras.SwiftFileList
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras.LinkFileList
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras-OutputFileMap.json
[ConcurrencyExtras] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras_vers.c
[ConcurrencyExtras] Write Auxiliary File ConcurrencyExtras.DependencyMetadataFileList
[CombineSchedulers] Write Auxiliary File module.modulemap
[CombineSchedulers] Write Auxiliary File CombineSchedulers_const_extract_protocols.json
[CombineSchedulers] Write Auxiliary File CombineSchedulers.SwiftFileList
[CombineSchedulers] Write Auxiliary File CombineSchedulers.LinkFileList
[CombineSchedulers] Write Auxiliary File CombineSchedulers-OutputFileMap.json
[CombineSchedulers] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[CombineSchedulers] Write Auxiliary File CombineSchedulers_const_extract_protocols.json
[CombineSchedulers] Write Auxiliary File CombineSchedulers.SwiftFileList
[CombineSchedulers] Write Auxiliary File CombineSchedulers.LinkFileList
[CombineSchedulers] Write Auxiliary File CombineSchedulers-OutputFileMap.json
[CombineSchedulers] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[CombineSchedulers] Write Auxiliary File CombineSchedulers_vers.c
[CombineSchedulers] Write Auxiliary File CombineSchedulers.DependencyMetadataFileList
[Clocks] Write Auxiliary File module.modulemap
[Clocks] Write Auxiliary File Clocks.SwiftFileList
[Clocks] Write Auxiliary File Clocks.LinkFileList
[Clocks] Write Auxiliary File Clocks-OutputFileMap.json
[Clocks] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Clocks] Write Auxiliary File Clocks_const_extract_protocols.json
[Clocks] Write Auxiliary File Clocks.SwiftFileList
[Clocks] Write Auxiliary File Clocks.LinkFileList
[Clocks] Write Auxiliary File Clocks-OutputFileMap.json
[Clocks] Write Auxiliary File 7187679823f38a2a940e0043cdf9d637-common-args.resp
[Clocks] Write Auxiliary File Clocks_vers.c
[Clocks] Write Auxiliary File Clocks.DependencyMetadataFileList
[ConcurrencyExtras] Copy module.modulemap -> module.modulemap
[IssueReporting] Copy module.modulemap -> module.modulemap
[IssueReporting] Processing IssueReporting-Info.plist
[ConcurrencyExtras] Processing ConcurrencyExtras-Info.plist
[ConcurrencyExtras] Copy arm64-apple-ios-simulator.abi.json -> ConcurrencyExtras.abi.json
[ConcurrencyExtras] Copy arm64-apple-ios-simulator.swiftdoc -> ConcurrencyExtras.swiftdoc
[ConcurrencyExtras] Copy x86_64-apple-ios-simulator.swiftmodule -> ConcurrencyExtras.swiftmodule
[ConcurrencyExtras] Copy x86_64-apple-ios-simulator.swiftdoc -> ConcurrencyExtras.swiftdoc
[ConcurrencyExtras] Copy x86_64-apple-ios-simulator.abi.json -> ConcurrencyExtras.abi.json
[ConcurrencyExtras] Copy arm64-apple-ios-simulator.swiftsourceinfo -> ConcurrencyExtras.swiftsourceinfo
[ConcurrencyExtras] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> ConcurrencyExtras.swiftsourceinfo
[ConcurrencyExtras] Copy arm64-apple-ios-simulator.swiftmodule -> ConcurrencyExtras.swiftmodule
[ConcurrencyExtras] Compiling ConcurrencyExtras_vers.c
[ConcurrencyExtras] Compiling ConcurrencyExtras_vers.c
[ConcurrencyExtras] Building library ConcurrencyExtras
[ConcurrencyExtras] Building library ConcurrencyExtras
Signing ConcurrencyExtras.framework (in target 'ConcurrencyExtras' from project 'swift-concurrency-extras')
[ConcurrencyExtras] Touching ConcurrencyExtras.framework
[IssueReporting] Copy arm64-apple-ios-simulator.abi.json -> IssueReporting.abi.json
[IssueReporting] Copy arm64-apple-ios-simulator.swiftdoc -> IssueReporting.swiftdoc
[IssueReporting] Copy arm64-apple-ios-simulator.swiftmodule -> IssueReporting.swiftmodule
[IssueReporting] Copy arm64-apple-ios-simulator.swiftsourceinfo -> IssueReporting.swiftsourceinfo
[IssueReporting] Copy x86_64-apple-ios-simulator.swiftdoc -> IssueReporting.swiftdoc
[IssueReporting] Copy x86_64-apple-ios-simulator.swiftmodule -> IssueReporting.swiftmodule
[IssueReporting] Copy x86_64-apple-ios-simulator.abi.json -> IssueReporting.abi.json
[IssueReporting] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> IssueReporting.swiftsourceinfo
[Clocks] Copy module.modulemap -> module.modulemap
[XCTestDynamicOverlay] Copy module.modulemap -> module.modulemap
[CombineSchedulers] Copy module.modulemap -> module.modulemap
[IssueReporting] Compiling IssueReporting_vers.c
[IssueReporting] Compiling IssueReporting_vers.c
[IssueReporting] Building library IssueReporting
Signing IssueReporting.framework (in target 'IssueReporting' from project 'xctest-dynamic-overlay')
[IssueReporting] Touching IssueReporting.framework
[XCTestDynamicOverlay] Processing XCTestDynamicOverlay-Info.plist
[CombineSchedulers] Processing CombineSchedulers-Info.plist
[Clocks] Processing Clocks-Info.plist
[XCTestDynamicOverlay] Copy arm64-apple-ios-simulator.abi.json -> XCTestDynamicOverlay.abi.json
[XCTestDynamicOverlay] Copy arm64-apple-ios-simulator.swiftdoc -> XCTestDynamicOverlay.swiftdoc
[XCTestDynamicOverlay] Copy arm64-apple-ios-simulator.swiftmodule -> XCTestDynamicOverlay.swiftmodule
[XCTestDynamicOverlay] Copy arm64-apple-ios-simulator.swiftsourceinfo -> XCTestDynamicOverlay.swiftsourceinfo
[XCTestDynamicOverlay] Copy x86_64-apple-ios-simulator.swiftdoc -> XCTestDynamicOverlay.swiftdoc
[XCTestDynamicOverlay] Copy x86_64-apple-ios-simulator.abi.json -> XCTestDynamicOverlay.abi.json
[XCTestDynamicOverlay] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> XCTestDynamicOverlay.swiftsourceinfo
[XCTestDynamicOverlay] Compiling XCTestDynamicOverlay_vers.c
[XCTestDynamicOverlay] Compiling XCTestDynamicOverlay_vers.c
[XCTestDynamicOverlay] Building library XCTestDynamicOverlay
[XCTestDynamicOverlay] Building library XCTestDynamicOverlay
Signing XCTestDynamicOverlay.framework (in target 'XCTestDynamicOverlay' from project 'xctest-dynamic-overlay')
[XCTestDynamicOverlay] Touching XCTestDynamicOverlay.framework
[Clocks] Copy arm64-apple-ios-simulator.swiftdoc -> Clocks.swiftdoc
[Clocks] Copy arm64-apple-ios-simulator.swiftmodule -> Clocks.swiftmodule
[Clocks] Copy arm64-apple-ios-simulator.abi.json -> Clocks.abi.json
[Clocks] Copy arm64-apple-ios-simulator.swiftsourceinfo -> Clocks.swiftsourceinfo
[Clocks] Copy x86_64-apple-ios-simulator.swiftdoc -> Clocks.swiftdoc
[Clocks] Copy x86_64-apple-ios-simulator.swiftmodule -> Clocks.swiftmodule
[Clocks] Copy x86_64-apple-ios-simulator.abi.json -> Clocks.abi.json
[Clocks] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> Clocks.swiftsourceinfo
[Clocks] Compiling Clocks_vers.c
[Clocks] Compiling Clocks_vers.c
[Clocks] Building library Clocks
[Clocks] Building library Clocks
Signing Clocks.framework (in target 'Clocks' from project 'swift-clocks')
[Clocks] Touching Clocks.framework
[CombineSchedulers] Copy arm64-apple-ios-simulator.swiftmodule -> CombineSchedulers.swiftmodule
[CombineSchedulers] Copy arm64-apple-ios-simulator.swiftdoc -> CombineSchedulers.swiftdoc
[CombineSchedulers] Copy arm64-apple-ios-simulator.swiftsourceinfo -> CombineSchedulers.swiftsourceinfo
[CombineSchedulers] Copy x86_64-apple-ios-simulator.swiftdoc -> CombineSchedulers.swiftdoc
[CombineSchedulers] Copy x86_64-apple-ios-simulator.swiftmodule -> CombineSchedulers.swiftmodule
[CombineSchedulers] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> CombineSchedulers.swiftsourceinfo
[Dependencies] Copy module.modulemap -> module.modulemap
[CombineSchedulers] Compiling CombineSchedulers_vers.c
[CombineSchedulers] Compiling CombineSchedulers_vers.c
[CombineSchedulers] Building library CombineSchedulers
[CombineSchedulers] Building library CombineSchedulers
Signing CombineSchedulers.framework (in target 'CombineSchedulers' from project 'combine-schedulers')
[CombineSchedulers] Touching CombineSchedulers.framework
[Dependencies] Copy arm64-apple-ios-simulator.abi.json -> Dependencies.abi.json
[Dependencies] Copy arm64-apple-ios-simulator.swiftdoc -> Dependencies.swiftdoc
[Dependencies] Copy arm64-apple-ios-simulator.swiftmodule -> Dependencies.swiftmodule
[Dependencies] Copy arm64-apple-ios-simulator.swiftsourceinfo -> Dependencies.swiftsourceinfo
[Dependencies] Copy x86_64-apple-ios-simulator.swiftmodule -> Dependencies.swiftmodule
[Dependencies] Copy x86_64-apple-ios-simulator.swiftsourceinfo -> Dependencies.swiftsourceinfo
[Dependencies] Copy x86_64-apple-ios-simulator.abi.json -> Dependencies.abi.json
[Utils] Copy module.modulemap -> module.modulemap
[Dependencies] Compiling Dependencies_vers.c
[Dependencies] Compiling Dependencies_vers.c
❌ /Users/billy/workspace/TestTuist/Modules/Utils/Sources/DateProvider.swift:1:8: no such module 'Dependencies'
[Utils] Compiling AlwaysEqual.swift
[Utils] Compiling DateProvider.swift
[Dependencies] Building library Dependencies
[Dependencies] Building library Dependencies
Signing Dependencies.framework (in target 'Dependencies' from project 'swift-dependencies')
[Dependencies] Touching Dependencies.framework
[Utils] Processing Utils-Info.plist
The following warnings need attention:
· The project 'swift-dependencies' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have [Development (debug), Nightly (release), Production (release)]
· The project 'xctest-dynamic-overlay' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have [Development (debug), Nightly (release), Production (release)]
· The project 'swift-concurrency-extras' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have [Development (debug), Nightly (release), Production (release)]
· The project 'swift-clocks' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have [Development (debug), Nightly (release), Production (release)]
· The project 'combine-schedulers' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have [Development (debug), Nightly (release), Production (release)]
The 'xcodebuild' command exited with error code 65 and message:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:3684DAE2-C27A-42F2-8BA0-CCE240BDD900, OS:18.1, name:iPhone 16 Plus }
{ platform:iOS Simulator, id:3684DAE2-C27A-42F2-8BA0-CCE240BDD900, OS:18.1, name:iPhone 16 Plus }
** BUILD FAILED **
The following build commands failed:
EmitSwiftModule normal arm64 (in target 'Utils' from project 'TestBug')
SwiftEmitModule normal arm64 Emitting\ module\ for\ Utils (in target 'Utils' from project 'TestBug')
Building workspace TestBug with scheme Utils
(3 failures)
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
15.1
4.35.0
16.1
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too