Swft build fails with 'error: could not build Objective-C module 'SwiftSyntax''
drekka opened this issue · 2 comments
drekka commented
Description
I'm building a SPM project that uses SwiftSyntax similar to Apple's swift-format project. In my package file I've included SwiftSyntax's main branch and the project builds in Xcode without issue.
But when I attempt to build it on the command line using swift build
I get a series of errors like this one:
error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/derekclarkson/projects/SwiftTypesetter/.build/arm64-apple-macosx/debug/SwiftSyntax.build/module.modulemap:2:12: error: header '/Users/derekclarkson/projects/SwiftTypesetter/.build/arm64-apple-macosx/debug/SwiftSyntax.build/SwiftSyntax-Swift.h' not found
header "/Users/derekclarkson/projects/SwiftTypesetter/.build/arm64-apple-macosx/debug/SwiftSyntax.build/SwiftSyntax-Swift.h"
^
I know SwiftSyntax can be used in an SPM project and built using swift build
because it works in Apple's swift-format project, but I don't know why it's not working for me or what I've missed.
Any clues?
Steps to Reproduce
No response
ahoppen commented
Synced to Apple’s issue tracker as rdar://127811495
drekka commented
Opps I had a fault in my package I hadn't spotted. So closing.