I took the new swift-api-extract for a ride, and found that while it can dump the API for .swiftmodules, if this swiftmodule depends on a native library, the program crashes with the following assertion:
And run "make", this will build, and then attempt to use swift-api-extract, which will crash with the above message. It seems to want a .swiftmodule for the NativeDep library, but since it is a C library, there is no swiftmodule available for it.
The text was updated successfully, but these errors were encountered:
Thanks for testing driving the new option. I kind of aware of this can happen when I write the current implementation (along with other issues, like you cannot request api-extract on a non swift modules). I will keep improving on the current implementation, and at the same time, don't develop serious dependency on the current JSON output format and expect that will be stable.
I took a quick look at this bug. This is not actually what I thought it was. This is likely because of either using the wrong underlying compiler from swift PM (which you need to overwrite with a just built toolchain):
<unknown>:0: error: module compiled with Swift 5.4 cannot be imported by the Swift 5.5 compiler: /@input/ApiDemo.swiftmodule
or (which you need to give clang importer a search path to locate NativeDep, which the option doesn't exist yet):