-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Xcode 14.3 RC 2 (14E222b)/Swift Compiler 5.8 SwiftVerifyEmittedModuleInterface failed to verify module interface #64669
Comments
You can try change the default behavior of the Swift compiler by passing |
@CrazyFanFan thank you very much, it works. |
|
For my side, adding |
@super-gsevla put the if you use CocoaPods, you can add |
Hey! Sorry about the delay. We have solved it here by setting only active arch to "no" into cocoapods build_settings post_install hook. |
@xymus Does this look like a compiler bug to you? |
The workarounds are working for us but we would like to know if this is intended behavior as of Xcode 14.3, or if this is a bug. We created the following radar under our team. |
This is a known compiler limitation, it doesn't handle well the ambiguity when a type has the same name as a module. It can break the generated swiftinterfaces. Here you see it reported by the swiftinterface verification, but it would likely also break clients of the module when they use a different Xcode or compiler version. If you see an error like |
@xymus Thank you for your reply, in my project Attached is a demo project. |
Reduced: // module 'test'
struct test {}
func foo(_: test.test) {} // error: 'test' is not a member type of struct 'test.test' |
None of the solutions worked for me. |
As mentioned above, the error is triggered by a dependency. Experiencing the same issue when archiving a framework using the Xcode: 14.3 |
This works around a problem of having a type and module share the same name. Xcode 14.3 doesn't like it in textual swiftinterface files, and in xcodebuild the interface verification would fail. See swiftlang/swift#64669
This works around a problem of having a type and module share the same name. Xcode 14.3 doesn't like it in textual swiftinterface files, and in xcodebuild the interface verification would fail. See swiftlang/swift#64669
Looks like xcode 14.3 useless for us now.. and should we downgrade to 14.2? |
What's new in recent Xcodes is that we report this issue whereas older Xcodes would not detect it, which lead to delayed failures. For the time being, my advice is to try the workarounds I suggested above first. In last resort you can disable the verification with |
Should we use unsafe flags for SPM?
We are making a framework spm, and our clients should be sure about safe code and ABI support. The whole community started renaming all packages. Maybe we should just a wait? |
Related issue: #56573 |
UPD:
@xymus Thanks, for your useful advice! |
Duplicate of #56573 |
The solution of adding |
…aving a class named AppsFlyerLib swiftlang/swift#64669 (comment)
* Remove TealiumRegistration and notification handling in favour of onReady * Make sure that every onReady publishes old registered callbacks in case it detects a manual initialization * Test and fix onReady calls and initialize Remove initialize background queue dispatch as it is already happening on that queue * Update Carthage/SPM and add publish/build scripts * Remove comment * Avoid issues when build the framework due to AppsFlyerLib framework having a class named AppsFlyerLib swiftlang/swift#64669 (comment)
…olution support, remove obsolete copyrights. * Adding ConnectIQ as package dependency failed loading, unclear why. * Library evolution support must be disabled, otherwise compiler error (see swiftlang/swift#64669 (comment))
This is a workaround for the compiler bug introduced at XCode 14.3, which has been still there as at XCode 16.0. Ref: swiftlang/swift#64669 Ref: https://stackoverflow.com/questions/75955074/swiftverifyemittedmoduleinterface-normal-arm64-issue-building-release-with-crypt
Description
Use Xcode 14.3 RC 2 compile a swift file which import a objc clang module, and a framework with swiftinterface, verify module interface happened error. The clang module path is explicitly passed by
-fmodule-map-file
.Steps to reproduce
1、download SwiftVerifyInterfaceIssue.zip and unzip
2、Use Xcode 14.3 RC 2 open SwiftVerifyInterfaceIssue.xcworkspace, and then build
Expected behavior
build success
Environment
SwiftVerifyInterfaceIssue.zip
The text was updated successfully, but these errors were encountered: