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
I mentioned this awhile ago and found a work around, but more and more frameworks appear to be using @import which fails with "Use of @import when modules are disabled." the failing library was imported with cocoapods and I looked at the targets and made sure the setting "Allow Non-modular includes in Framework Modules" was set to yes. When building my project normally the build is successful. It's only my cedar specs target thats failing.
How can I test classes that use or have dependancies that use @import?
The text was updated successfully, but these errors were encountered:
Hey @jkunzelman, the @import feature requires clang modules to be enabled. Clang modules are not well-supported for C++, so they are disabled by default, however it is possible to explicitly turn them on, which may or may not resolve your issues. To turn this on, add -fcxx-modules to the Other C++ Flags build settings in your spec target.
There's a real chance you will run into compiler bugs when doing this, but I have seen this work successfully in some basic smoke testing.
Is there a radar that we could duplicate so that apple is aware that people want to use @import from a C++ context?
Another alternative, albeit less exciting answer, is to switch to using Quick and Nimble, which are available for both Objective-C and Swift. It probably won't be easy, and it's not a magic bullet, because you'll still have some strange cases where things fail to compile for one reason or another, but it certainly would resolve your pain with @import, @jkunzelman.
I mentioned this awhile ago and found a work around, but more and more frameworks appear to be using @import which fails with "Use of @import when modules are disabled." the failing library was imported with cocoapods and I looked at the targets and made sure the setting "Allow Non-modular includes in Framework Modules" was set to yes. When building my project normally the build is successful. It's only my cedar specs target thats failing.
How can I test classes that use or have dependancies that use @import?
The text was updated successfully, but these errors were encountered: