Open iby opened 7 years ago
Can you attach the project?
See attached project and gif. I traced it down to presence of a module map in the same folder with compiled code – they somehow get included in the equation and mess things up:
Project with two targets. The fact that they share product module name doesn't matter – tested.
Framework uses module maps and has `SWIFT_INCLUDE_PATHS` configured.
Static library uses `HEADER_SEARCH_PATHS` configured.
Framework builds fine, library build fails. Targets are not related in any way.
Clearing framework's `SWIFT_INCLUDE_PATHS` makes frameworks build fail, but doesn't help library.
Commenting out part of the private module section makes library build to succeed. WTF!
Moving module map out of `Foo` folder also allows build to succeed.
It also works if I comment out `Bar` extension contents or move `Baz` into the same file with `Bar`.
It appears the compiler "goes extra step" and includes module maps in folders with code, even when not asked to?
P. S. You can go further and remove framework target, it still fails if module map resides in `Foo` folder.
![](2017-09-29 14.56.56.gif)
I'm coming across the same bug in a different situation with static library being used from a framework.
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash | |Assignee | None | |Priority | Medium | md5: a1a151f4b5e245a9f1117780ba73dea0Issue Description:
Some nasty compiler errors while playing around with static library.