Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-8629] Wrong compiler and missing use modules flag for C/ObjC dependency in stephencelis/SQLite.swift when using generated Xcode project #5342

Closed
swift-ci opened this issue Aug 24, 2018 · 1 comment
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-8629
Radar None
Original Reporter ricardopereira (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Xcode v10.0 beta 6 (10L232m), Swift 4.1

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: ffadfdaa8ec9484286b99437d3ef0fd7

duplicates:

  • SR-7531 SwiftPM doesn't set CLANG_ENABLE_MODULES

Issue Description:

I integrated the stephencelis/SQLite.swift package into my project and re-generated the Xcode project using the subcommand `generate-xcodeproj`. The project builded successfully using the CLI (`swift build`) but not in Xcode. The ObjC target is using the Swift compiler by default but it should use ObjC. We already did some investigation and we found a workaround: stephencelis/SQLite.swift#828

Package.swift file: https://github.com/stephencelis/SQLite.swift/blob/f8032b2c2cda38311bda44eef2c5570022fe2f33/Package.swift#L4

@ankitspd
Copy link
Member

Enable modules is disabled for C targets because of complicated reasons which break the indexing/autocompletion. This is because SwiftPM target model doesn't map 1:1 with Xcode's framework model. In Swift 4.2, we improved this situation for C targets that contain an umbrella header without any non-modular imports (import stuff outside of the target). Your package is compatible with this and the generated project starts working as expected if you rename `SQLite-Bridging.h` to `SQLiteObjc.h`.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants