XcodeGen 2.1.0 fails to build as an SPM dependency

Created on 7 Jan 2019  路  4Comments  路  Source: yonaskolb/XcodeGen

When adding XcodeGen 2.1.0 as a SPM dependency, compilation fails with the following message:

.../XcodeGen.git-2328129159905136123/Sources/ProjectSpec/Linkage.swift:12:9: error: switch must be exhaustive
        switch type {
        ^
.../XcodeGen.git-2328129159905136123/Sources/ProjectSpec/Linkage.swift:12:9: note: add missing case: '.instrumentsPackage'
        switch type {
        ^

It looks like the latest release of xcodeproj (6.4.0) added another case to PBXProductType which isn't being handled.

bug

All 4 comments

Hmm, this shouldn't happen because there's a Package.resolved checked in, which locks xcodeproj to 6.3.0? Perhaps that's only used if building the current package on it's own and not if it's used as a dependency

This is happening again in 2.11.0. 2.10.0 is working fine .

I'm trying to use XcodeGenKit as a dependency. When I'm trying build my project I'm getting

.../SourcePackages/checkouts/XcodeGen/Sources/ProjectSpec/Linkage.swift:12:9: Switch must be exhaustive

.xcFramework: case is missing.

Ok, we鈥檒l have to lock down the XcodeProj version, as it keeps introducing breaking changes.
Using a package as a dependency ignores its package.resolved

Fixed in 2.13.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

igorkulman picture igorkulman  路  5Comments

dabaddah picture dabaddah  路  4Comments

rpassis picture rpassis  路  5Comments

AlexisQapa picture AlexisQapa  路  3Comments

mrtsamma picture mrtsamma  路  3Comments