Willam Hill
Willam Hill

Reputation: 1602

Carthage + Quick framework + Swift 2 = "error: module file was created by an older version of the compiler; rebuild 'Quick' and try again"

I'm using Xcode 7 beta 5 (it's the only xcode currently installed) with Swift 2 and when I try to run unit tests with Quick, I get the following error:

error: module file was created by an older version of the compiler; rebuild 'Quick' and try again

I'm using Carthage (0.8.0) to manage my dependencies. My Cartfile.private has:

github "Quick/Quick" ~> 0.5.0
github "Quick/Nimble" "v2.0.0-rc.2"

As far as I know, these are the Swift 2 versions of these libraries. I have the libraries linked and when I try to run the unit tests, I get the noted error.

There's a similar question here but that doesn't seem like my problem Realm: Module was created by an older version of compiler and could not build objective-c module

I've cleaned out my DerivedData and Carthage/Build folders and still no luck.

How can I run unit tests with Swift 2 and Quick?

Upvotes: 0

Views: 1374

Answers (1)

Alexis R
Alexis R

Reputation: 91

It may be related to the following kind of problem if you updated from another beta version : https://github.com/neonichu/xcode-install/issues/48

xcode-install uses ditto to install Xcode, which merges files from the source into existing directories at the destination path.

If a new (beta) version of Xcode doesn't contain files which were present in the previous version, the old files will still be there after installing the update.

Try uninstalling and reinstalling Xcode.

Upvotes: 1

Related Questions