swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.74k stars 1.34k forks source link

[SR-10975] Improve the error message when a C target is missing the include directory #4693

Open hartbit opened 5 years ago

hartbit commented 5 years ago
Previous ID SR-10975
Radar rdar://problem/52162539
Original Reporter @hartbit
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: cf94b20028258c06eeacb2664750dd0a

Issue Description:

Currently, if a C target has header and source files in the same folder, without the required include dir, the target will build. But depending on it from a Swift target with generate an unhelpful error message:

<unknown>:0: error: module map file '/Users/david/Projects/GRDB.swift/.build/x86_64-apple-macosx/debug/SQLCipher.build/module.modulemap' not found
<unknown>:0: error: module map file '/Users/david/Projects/GRDB.swift/.build/x86_64-apple-macosx/debug/SQLCipher.build/module.modulemap' not found
<unknown>:0: error: missing required module 'SwiftShims' 

The error message should be improved and trigger when building the C target.

aciidgh commented 5 years ago

@radar create