mattgallagher / CwlPreconditionTesting

A Mach exception handler that allows Swift precondition failures to be caught and tested.
ISC License
175 stars 46 forks source link

CwlPreconditionTesting.framework/Modules/module.modulemap:9:12: Header 'CwlPreconditionTesting-Swift.h' not found #15

Closed gwennguihal closed 5 years ago

gwennguihal commented 5 years ago

I can't compile the project because of this error:

screen shot 2018-12-03 at 10 18 55

I noticed an issue when installing pods: My podfile: pod 'CwlPreconditionTesting', :git => 'https://github.com/mattgallagher/CwlPreconditionTesting.git' pod 'CwlCatchException', :git => 'https://github.com/mattgallagher/CwlCatchException.git' The result of installation: Installing CwlCatchException 1.0.2 Installing CwlPreconditionTesting 1.1.0

Both are no using the same version 1.1.0, it's the cause of the problem ?

mattgallagher commented 5 years ago

Hi @gwennguihal, it looks like I forgot to add a dependency on CwlCatchException in the CwlPreconditionTesting.podspec file when I restructured the project, recently.

I've pushed a commit which should fix this, cd2b66cca9ea9e86147231ae32a1e10e6b881062. If you throw away your Podfile.lock file and pod install again, you should pick up this change.

gwennguihal commented 5 years ago

Sorry, but I have still the problem. Installing CwlCatchException 1.0.2 Installing CwlPreconditionTesting 1.1.0

mattgallagher commented 5 years ago

The problem you showed in the screenshot really is because CwlPreconditionTesting didn't reference CwlCatchException in the .podspec. If you're still seeing the same problem, then cocoapods has not actually updated.

In any case, I've run a broader range of tests, all on Xcode 10.1, mac OS Mojave, some with cocoapods 1.5.3 and some with cocoapods 1.6 beta 2 and I did have to make a couple additional changes to the .podspec file to fix some issues with macOS targets ignoring the mach_excServer file (iOS targets had these paths already so they mostly worked). If you were seeing this problem (it looks a little like the first problem) then this should now be fixed, too. Everything is working now (confirmed across multiple machines, including a clean image).

It can be a little tricky to see if Cocoapods has really picked up minor changes, so I've bumped the version number to 1.1.1 for CwlPreconditionTesting (if you don't see this version, you don't have the .podspec fixes).

If you're still seeing problems, then either Cocoapods hasn't picked up the 1.1.1 changes or hasn't updated the Pods directory. Standard advice if things seem unchanged: throw away the "Pods" directory, ".xcworkspace" file and "Podfile.lock" and run "pod install" again. Be sure to clean things in Xcode.