You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-2613 [SwiftPM] Second build of Vapor project isn't properly null
Issue Description:
The lack of a modulemap for the C module https://github.com/vapor/clibressl appears to be causing the package manager to rebuild unchanged modules. Each rebuild takes ~1 minute making development in Xcode the only realistic option.
Adding the following module map fixes the command line, but causes Xcode to fail with a `cannot find lib clibressl`. Therefore we have to rely on the automatically generated modulemap which might be the culprit behind this issue.
Here's the module map that fixes the CLI but breaks Xcode:
In my other project, I write the modulemap like below and it solves the problem.
module CFoo {
header "CFoo.h"
export *
}
I guess it's because Xcode is trying to find and link the shared library (form the line `link "CLibreSSL"`), which it either never exist nor Xcode has not hint how to find it.
In Swift PM the package manager will automatically generate a libCFoo.dylib under .build/debug after building the library that other dependencies can link with. But in Xcode it's not the case: It will only follow project configuration.
You can add "-L/path/to/your/project/.build/debug/" to "Other Linker Flags" under [Build Setting/Linking] in Xcode. (require you build the C library using the cmd at least once") or simply rewrite the modulemap not to link to "CLibreSSL".
Additional Detail from JIRA
md5: 72c455b3ab9efdb0ec7b1e60a5e92a0c
duplicates:
Issue Description:
The lack of a modulemap for the C module https://github.com/vapor/clibressl appears to be causing the package manager to rebuild unchanged modules. Each rebuild takes ~1 minute making development in Xcode the only realistic option.
Adding the following module map fixes the command line, but causes Xcode to fail with a `cannot find lib clibressl`. Therefore we have to rely on the automatically generated modulemap which might be the culprit behind this issue.
Here's the module map that fixes the CLI but breaks Xcode:
`Packages/CLibreSSL-xxx/Sources/CLibreSSL/include/module.modulemap`
Here is the output of two `swift build` calls in a row, without any modification to the source code between calls (and without a modulemap).
The text was updated successfully, but these errors were encountered: