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

Crashes on mkdir (File exists @ dir_s_mkdir) #4

Closed
DenTelezhkin opened this issue May 29, 2014 · 10 comments
Closed

Crashes on mkdir (File exists @ dir_s_mkdir) #4

DenTelezhkin opened this issue May 29, 2014 · 10 comments
Labels

Comments

@DenTelezhkin
Copy link

Hi! Gem looks really awesome!

Unfortunately, it crashes now for one of my projects, here's stack trace

/Users/.../.rvm/gems/ruby-2.1.1/gems/synx-0.0.2/lib/synx/pbx_group.rb:71:in `mkdir': File exists @ dir_s_mkdir - /Users/.../.synx/<path> (Errno::EEXIST)
    from /Users/.../.rvm/gems/ruby-2.1.1/gems/synx-0.0.2/lib/synx/pbx_group.rb:71:in `mkdir'
    from /Users/.../.rvm/gems/ruby-2.1.1/gems/synx-0.0.2/lib/synx/pbx_group.rb:71:in `handle_unused_entry'
    from /Users/.../.rvm/gems/ruby-2.1.1/gems/synx-0.0.2/lib/synx/pbx_group.rb:39:in `block in move_entries_not_in_xcodeproj'

My setup:
RVM, Ruby 2.1.1, Mac OS X 10.9.3

@marklarr
Copy link
Member

I assume you replaced the actual path with <path> in the snippet? Just checking 😁

@DenTelezhkin
Copy link
Author

Yep =) There was just a regular folder there. And this is actually happening for another project as well. Seems like it can be easily reproduced.

@marklarr
Copy link
Member

Agh! So many edge cases :)

Can you try out this branch and see if it fixes the issue? https://github.com/venmo/synx/tree/marklarr/mkdir_error

You should be able to use the branch by doing a Gemfile

# Gemfile
gem 'synx', :git => "git@github.com:venmo/synx.git", :branch => "marklarr/mkdir_error"

then bundle install

@marklarr marklarr added bug and removed bug labels May 29, 2014
@DenTelezhkin
Copy link
Author

Unfortunately, it doesn't solve the issue.

Stack:

/Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `mkdir': File exists @ dir_s_mkdir - /Users/.../.synx/.../.../.../... (Errno::EEXIST)
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `mkdir'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `handle_unused_entry'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:39:in `block in move_entries_not_in_xcodeproj'

The path to the directory is the same as the first time. I tried also deleting .synx/Project path just to make a clean start, it didn't help.

@marklarr
Copy link
Member

Hm.. Bummer. Do you think you could reproduce the issue in an open sourced dummy project? It'll be easier for others to understand what's happening then.

Thanks for filing this issue!

@DenTelezhkin
Copy link
Author

Sure! Here's project, that suffers from this issue:

DTTableViewManager

Stack trace:

/Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `mkdir': File exists @ dir_s_mkdir - /Users/.../.synx/Example/CedarUnitTests/mocks (Errno::EEXIST)
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `mkdir'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:71:in `handle_unused_entry'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:39:in `block in move_entries_not_in_xcodeproj'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:36:in `each'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/pbx_group.rb:36:in `move_entries_not_in_xcodeproj'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/project.rb:22:in `each'
    from /Users/.../.rvm/gems/ruby-2.1.1/bundler/gems/synx-0bfed8f1c52e/lib/synx/project.rb:22:in `sync'

I'm using synx with DTTableViewManager.xcodeproj, that is inside Example folder.

@joelfischerr
Copy link

I have the same issue.

@marklarr
Copy link
Member

This will hopefully work for you guys

#5

@marklarr marklarr added the bug label May 29, 2014
@DenTelezhkin
Copy link
Author

It does work for both of the projects, thank you =) Closing this issue.

@marklarr
Copy link
Member

Awesome! Thanks for your help. Pushed 0.0.3 to RubyGems with this bugfix.

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

No branches or pull requests

3 participants