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

Carthage build fails to find Nimble/Nimble-Swift.h using Xcode 11 in some environments (GitHub Actions/Xcode Bots) #702

Open
JosephDuffy opened this issue Oct 1, 2019 · 8 comments

Comments

@JosephDuffy
Copy link

@JosephDuffy JosephDuffy commented Oct 1, 2019

  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

Tried to build the Nimble project for iOS using Carthage on Xcode 11

What did you expect to happen?

Build to succeed

What actually happened instead?

The build fails with the error NMBStringify.m:6:9: fatal error: 'Nimble/Nimble-Swift.h' file not found #import <Nimble/Nimble-Swift.h>

Environment

List the software versions you're using:

  • Nimble: 8.0.4
  • Xcode Version: 11.0 (11A420a)
  • Swift Version: Xcode Default

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Carthage: 0.33.0

Extra info

When trying to build Nimble via Carthage in certain environments the Nimble/Nimble-Swift.h file is not found. I found that it fails in GitHub actions (example), but a question on StackOverflow shows it is failing when built by an Xcode Bot.

In GitHub actions is only fails when using Xcode 11, but for Xcode Bots I'm not sure (the question does not specify).

Workaround

The project can be built when using the Debug configuration, but this is not ideal.

@JosephDuffy JosephDuffy changed the title Carthage build sometimes fails to find Nimble/Nimble-Swift.h Carthage build fails to find Nimble/Nimble-Swift.h using Xcode 11 in some environments (GitHub Actions/Xcode Bots) Oct 1, 2019
@elefantel
Copy link

@elefantel elefantel commented Oct 9, 2019

Also getting this issue after update to MacOS Catalina 10.15 when using Carthage
Running command manually on terminal: carthage update --no-use-binaries --platform iOS

• Nimble: 8.0.4
• Xcode Version: 11.0 (11A420a)
• Swift Version: Xcode Default (5.1)

It would be nice to get a fix, it's breaking our builds

@vlypskyi
Copy link

@vlypskyi vlypskyi commented Nov 11, 2019

Seeing same issue on Jenkins CI with Xcode 11.1. Builds fine locally and on CircleCI.

@Danesz
Copy link

@Danesz Danesz commented Feb 25, 2020

Any update on this?
Getting the same issue? (XCode 11.3.1. Locally it builds fine, Jenkins CI throws the error.)

@dflems
Copy link

@dflems dflems commented Mar 9, 2020

If anyone is still seeing this issue when using GitHub Actions, I managed to get it to work by patching Nimble to use the legacy build system (setting BuildSystemType to Original in its WorkspaceSettings.xcsettings file)

skywalkerdude added a commit to HymnalDreamTeam/Hymns-iOS that referenced this issue Apr 11, 2020
@skywalkerdude

This comment has been hidden.

skywalkerdude added a commit to HymnalDreamTeam/Hymns-iOS that referenced this issue Apr 11, 2020
…ated mockingbird from 0.10.0 to 0.11.0) (#40)

Add Quick and Nimble into the project for better unit tests. See https://www.raywenderlich.com/135-behavior-driven-testing-tutorial-for-ios-with-quick-nimble for a good tutorial on what they are and how to use them

For some reason, a simple pod install doesn't work, so we are forced to add a pod deintegrate into the build step. There is an issue reported in the Nimble library and I also commented on the issue (Quick/Nimble#702 (comment)). Until we get more guidance on how to fix this CwlCatchException.h not found error, we're stuck deintegrating and re-installing all pods on every build. :(
@mikkoseppa
Copy link

@mikkoseppa mikkoseppa commented Apr 14, 2020

I'm struggling with this as well. Builds perfectly fine locally using Xcode 11.3.1 (and Xcode 11.4) but fails on CI most of the times. Suddenly couple of builds succeeded yesterday on CI, but then it started to fail again. And I'm always doing a clean install on CI with all Carthage caches cleared so the install should be deterministic.

According to the Xcode build logs on CI, the automatically generated Objective-C header Nimble-Swift.h is created correctly during the build process. Still it fails with:
Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m:6:9: fatal error: 'Nimble/Nimble-Swift.h' file not found

@vlypskyi
Copy link

@vlypskyi vlypskyi commented Apr 14, 2020

We found that immediately retrying the carthage build command helps working around this issue.

@mikkoseppa
Copy link

@mikkoseppa mikkoseppa commented Apr 16, 2020

We found that immediately retrying the carthage build command helps working around this issue.

@vlypskyi Thanks for the workaround 😄 I added a try-catch block to my Fastfile where I run Carthage bootstrap, so I can re-run it.

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.