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

Can't compile because "Nimble/Nimble-Swift.h" can't be found #280

Closed
inket opened this issue Apr 12, 2016 · 2 comments · Fixed by #283
Closed

Can't compile because "Nimble/Nimble-Swift.h" can't be found #280

inket opened this issue Apr 12, 2016 · 2 comments · Fixed by #283

Comments

@inket
Copy link
Contributor

inket commented Apr 12, 2016

I'm using CocoaPods to include Quick & Nimble, but it seems that Nimble can't compile anymore.

This is the error I'm having with xcodebuild. (same with Xcode)

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling AllPass.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling AssertionDispatcher.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling AssertionRecorder.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling Async.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling AsyncMatcherWrapper.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling BeAKindOf.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Compiling BeAnInstanceOf.swift

❌  ~/App/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h:2:9: 'Nimble/Nimble-Swift.h' file not found

#import <Nimble/Nimble-Swift.h>
        ^


▸ Building Pods/Quick [Debug]
▸ Check Dependencies
▸ Processing Info.plist

Testing failed:
  'Nimble/Nimble-Swift.h' file not found
  Could not build Objective-C module 'Nimble'
** TEST FAILED **


The following build commands failed:
  CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Utils/Async.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift
  CompileSwift normal x86_64 ~/App/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift
(9 failures)

Environment

Xcode 7.3

> swift
Welcome to Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29).

Podfile

platform :ios, '8.0'
use_frameworks!

...

target 'AppTests' do
  pod 'Quick', git: "https://github.com/Quick/Quick"
  pod 'Nimble', git: "https://github.com/Quick/Nimble"
end

Podfile.lock

...

EXTERNAL SOURCES:
  Nimble:
    :git: https://github.com/Quick/Nimble
  Quick:
    :git: https://github.com/Quick/Quick

CHECKOUT OPTIONS:
  Nimble:
    :commit: 1a9e53e2d74363e1d6320a87a5028bc234c9a4d4
    :git: https://github.com/Quick/Nimble
  Quick:
    :commit: dc2b4b75d2f718518acbdef289a72fad77975a8a
    :git: https://github.com/Quick/Quick
...
@humblehacker
Copy link
Contributor

humblehacker commented Apr 17, 2016

I'm getting this too with Nimble 4.0.0 installed via CocoaPods. I was able to temporarily work around it by editing the generated umbrella header and commenting out CurrentTestCaseTracker:

#import <UIKit/UIKit.h>

//#import "CurrentTestCaseTracker.h"
#import "DSL.h"
#import "NMBExceptionCapture.h"
#import "NMBStringify.h"
#import "Nimble.h"

FOUNDATION_EXPORT double NimbleVersionNumber;
FOUNDATION_EXPORT const unsigned char NimbleVersionString[];

After this, I get warnings
/Users/david/src/EasyShiftIOS/Carbon/Example/<module-includes>:1:1: Umbrella header for module 'Nimble' does not include header 'CurrentTestCaseTracker.h'
but my tests are successfully run.

Looking for a more permanent solution as this clearly won't work for automated builds.

@ashfurrow
Copy link
Member

Hey, I was having the same issue and I've opened a pull request on Nimble to fix it: #283

In the meantime, you can use my fix immediately by using this in your podfile:

pod 'Nimble', :git => 'https://github.com/ashfurrow/Nimble.git', :branch => 'podspec-update'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants