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

A crash again #155

Closed maximkhatskevich closed 7 years ago

maximkhatskevich commented 7 years ago

MaxBook:MKHRequirement maxim$ xcake make

maximkhatskevich commented 7 years ago

Any ideas why?

maximkhatskevich commented 7 years ago

Sometimes the output is like this:

MaxBook:MKHRequirement maxim$ xcake make

jcampbell05 commented 7 years ago

@maximkhatskevich I think this is the same crash as before, if you clone this repo and run rake install then the development version of 0.8.9 should be installed and you can see if that fixes it.

I'm considering releasing 0.8.9 with these fixes and doing another 0.8.10 with the rest

maximkhatskevich commented 7 years ago

I think iterating faster would be better than waiting for longer :) Okay, I'll try to install from sources, but a release would be very welcome!

jcampbell05 commented 7 years ago

@maximkhatskevich sure I'll release tonight :)

maximkhatskevich commented 7 years ago

Should I use 'master' branch for installing from source?

maximkhatskevich commented 7 years ago

MaxBook:xcake maxim$ rake install rake aborted! LoadError: cannot load such file -- bundler/gem_tasks /Users/maxim/Dev/xcake/Rakefile:1:in <top (required)>' /Users/maxim/.rvm/gems/ruby-2.4.0@global/gems/rake-12.0.0/exe/rake:27:in<top (required)>' /Users/maxim/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in eval' /Users/maxim/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in

' (See full trace by running task with --trace)

maximkhatskevich commented 7 years ago

doesn't work, even if I switch to ruby 2.0.0

jcampbell05 commented 7 years ago

ah you need to run gem install rake && gem install bundle and then re run it :)

maximkhatskevich commented 7 years ago

omg... I'm almost ready to give up on all that Ruby stuff... :) Okay, doing that now.

jcampbell05 commented 7 years ago

@maximkhatskevich haha it's a learning curve at first but then you get used to it haha

maximkhatskevich commented 7 years ago

Anyway...

MaxBook:xcake maxim$ rake install rake aborted! LoadError: cannot load such file -- rspec/core/rake_task /Users/maxim/Dev/xcake/Rakefile:2:in <top (required)>' /Users/maxim/.rvm/gems/ruby-2.0.0-p648/gems/rake-12.0.0/exe/rake:27:in<top (required)>' /Users/maxim/.rvm/gems/ruby-2.0.0-p648/bin/ruby_executable_hooks:15:in eval' /Users/maxim/.rvm/gems/ruby-2.0.0-p648/bin/ruby_executable_hooks:15:in

' (See full trace by running task with --trace)

maximkhatskevich commented 7 years ago

after installing the above

maximkhatskevich commented 7 years ago

Okay, I guessed it. 'rspec' is another gem I needed to install.

maximkhatskevich commented 7 years ago

MaxBook:MKHRequirement maxim$ xcake make

Any ideas now?

jcampbell05 commented 7 years ago

:) yup, you're getting it - okay seems like this is a different error. Let me look through my code and see if I cab bash out a quick fix for you :) should be a simple one

maximkhatskevich commented 7 years ago

would be awesome! Thx!

jcampbell05 commented 7 years ago

@maximkhatskevich so pushed a fix to master, I am writing some unit tests for it but feel free to pull it down and test it out :)

maximkhatskevich commented 7 years ago

no, sorry, seems to be the same result :(

maximkhatskevich commented 7 years ago

MaxBook:MKHRequirement maxim$ xcake make

jcampbell05 commented 7 years ago

@maximkhatskevich just so I can test this on my end is this the Cakemania Framework Example ?

maximkhatskevich commented 7 years ago

no, it's one of my side projects. Let me try it with Cakemania, actually

maximkhatskevich commented 7 years ago

Yes, same happens when I'm trying to run 'xcake make' against the Cakefile of framework example

maximkhatskevich commented 7 years ago

Please, confirm if you see this crash on your side?

jcampbell05 commented 7 years ago

@maximkhatskevich cool, I'll use that to verify my fix rather than wasting your time :)

maximkhatskevich commented 7 years ago

thx, I'm here waiting for the fix, really need this to move forward :)

jcampbell05 commented 7 years ago

@maximkhatskevich Cool, so I've tried fixing it. Turns out it was a minr feature to make xcake behave more like xcode. But I'll disable it for now :) and push it up.

jcampbell05 commented 7 years ago

Pushed :)

maximkhatskevich commented 7 years ago

Okay, now it does not crash. I'm going to verify how it works in more details. Will let you know if I find any issues, of course.

jcampbell05 commented 7 years ago

@maximkhatskevich :) sure, need to get all these bugs out.

maximkhatskevich commented 7 years ago

problems again

maximkhatskevich commented 7 years ago

I uncommented my unit tests target in the Cakefile and getting this:

MaxBook:MKHRequirement maxim$ xcake make

maximkhatskevich commented 7 years ago

What a big pain that Xcode project file!

jcampbell05 commented 7 years ago

@maximkhatskevich it's good, it's battle testing it :) I'll have a look into this :)

maximkhatskevich commented 7 years ago

Maybe you require a specific version of Xcodeproj?

jcampbell05 commented 7 years ago

@maximkhatskevich I've been thinking about bumping up the requiremnt I think the one in the gemspec right now is too low we should limit support to the latest version since most people use the latest xcode :)

maximkhatskevich commented 7 years ago

sure, I agree

maximkhatskevich commented 7 years ago

Waiting for your updates/instructions :)

jcampbell05 commented 7 years ago

Do you know what xcodeproj you have btw ? will be interested to see where dirname went

maximkhatskevich commented 7 years ago

xcodeproj --version 1.4.2

maximkhatskevich commented 7 years ago

Something you expected?

jcampbell05 commented 7 years ago

@maximkhatskevich looks like there is some file path I didn't code Xcake to support or something in Xcodeproj has changed and its now returning a file reference when Xcake didn't expect.

So Xcake is doing something unsupported and crashing. Just would like to know what that file path is. I'll probably need an example project for this one that can recreate the crash since it depends on what files you are trying to include etc :)

maximkhatskevich commented 7 years ago

okay, give me a moment

maximkhatskevich commented 7 years ago

Checkout project from 'develop' https://github.com/maximkhatskevich/MKHRequirement/tree/develop

maximkhatskevich commented 7 years ago

The Cakefile is there

maximkhatskevich commented 7 years ago

I was experimenting with Struct, btw, it is a bit more stable, but functionality is more limited than Xcake, so I'm getting back on Xcake, if will be able to make it work again for me :)

ghost commented 7 years ago

@maximkhatskevich Please feel free to file any issues on missing functionality in struct. It'd be great to add anything you're currently missing!

jcampbell05 commented 7 years ago

@maximkhatskevich Yeah I've decided Struct will be the better tool in the long term, so I'm helping to make that better and add what I can from Xcake.

Of course not everything will make it as Struct is supposed to be tighter than Xcake. I'm hoping to get all of these bugs fixed in Xcake so I can have it in a good state as I know a lot of people like Xcake.

But like @lyptt says file what you are missing and I can help get it into Struct as well :)

maximkhatskevich commented 7 years ago

@lyptt I'll take an eye on both projects, but currently the biggest thing is how unstable all that. So much unexpected/undocumented behavior, and I can't easy reuse settings in config file. @lyptt take a look on https://github.com/maximkhatskevich/MKHRequirement/blob/develop/Cakefile and notice how easy and naturally things are nested one into another and how nested scopes easy override what's been defined in an outer scope. For example, I define settings for all Build Configurations, and then override just one or two only for 'Release' configuration, etc. This is missing in Struct. The custom 'def ...' declarations not working - I made them work not causing crashes somehow, but overrides from then are not taking effect on the final project file. Or if I defined settings for all configurations, I can't add few specific overrides just for one Configuration.

jcampbell05 commented 7 years ago

@maximkhatskevich also checking out your project and will try it out :) sorry about this. I've decided to add some tests to see if Xcake can generate the Cakemania proects :)

https://github.com/maximkhatskevich/MKHRequirement/tree/develop