igor-makarov / xcake

:cake: Describe Xcode projects in a human readable format and (re)generate one on demand.
MIT License
634 stars 48 forks source link

Crashes again #154

Closed maximkhatskevich closed 7 years ago

maximkhatskevich commented 7 years ago

Setting up a new iOS framework repo. Tried to use Xcake from within Fastlane lane, got a crash. The Cakefile is 100% valid, just copied from another framework where it has no issues, changed the name of the project and added couple more build settings.

Here is the log:

fastlane finished with errors

[!] Exit status of command 'cd ./.. && xcake make && pod update --no-repo-update' was 1 instead of 0. /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/generator/scheme_generator.rb:33:in block in visit_target': undefined methodbuild_for_running' for # (NoMethodError) from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/generator/scheme_generator.rb:16:in each' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/generator/scheme_generator.rb:16:invisit_target' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/visitor.rb:45:in visit' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/dsl/project.rb:83:inblock in accept' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/dsl/project.rb:82:in each' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/dsl/project.rb:82:inaccept' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/command/make.rb:25:in block in run' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/command/make.rb:23:ineach' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/lib/xcake/command/make.rb:23:in run' from /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:inrun' from /Library/Ruby/Gems/2.0.0/gems/xcake-0.8.8/bin/xcake:6:in <top (required)>' from /usr/local/bin/xcake:23:inload' from /usr/local/bin/xcake:23:in `

'

  • Reading Cakefile
  • Creating Project
  • Creating Target
  • Creating Target
  • Resolving Project
  • Resolving Target
  • Resolving Target
  • Creating build configurations for Project
  • Creating build configuration Debug for Project
  • Creating build configuration Release for Project
  • Creating build configurations for Target
  • Creating build configuration Debug for Target
  • Creating build configuration Release for Target
  • Creating build configurations for Target
  • Creating build configuration Debug for Target
  • Creating build configuration Release for Target
  • Creating User Schemes
maximkhatskevich commented 7 years ago

Any ideas what to do?

jcampbell05 commented 7 years ago

@maximkhatskevich could you tell me what version of xcodeproj you have ? I'm wondering if I am using a feature that doesn't exist in that version

maximkhatskevich commented 7 years ago

xcodeproj --version 1.4.2

jcampbell05 commented 7 years ago

So looks like it's related to the Entry code in https://github.com/CocoaPods/Xcodeproj/blob/0.28.1/lib/xcodeproj/scheme/build_action.rb

jcampbell05 commented 7 years ago

Adding this to 0.8.9

maximkhatskevich commented 7 years ago

I trust you :)

maximkhatskevich commented 7 years ago

Thx for quick response!

jcampbell05 commented 7 years ago

No worries, I'm hoping 0.8.9 will be a much better experience for you :) sorry for the pain.

jcampbell05 commented 7 years ago

So this should be fixed by the latest version on master, I've found that ruby can select the wrong version of xcake so you should remove all older versions before running it :)