Giter Site home page Giter Site logo

synx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synx's Issues

unhandled crash during the reordering.

I want use synx in a simple (but old) project.
It's a single target application with cocoapods dependencies.
In the middle of the operation the app crashes whit this message
/Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/abstract_object.rb:18:in 'work_pathname': undefined method '[]' for nil:NilClass (NoMethodError)

This is the stacktrace

    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/pbx_variant_group.rb:18:in `sync'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:in `block in sync'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:in `sync'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:16:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:6:in `<top (required)>'
    from /usr/bin/synx:23:in `load'
    from /usr/bin/synx:23:in `<main>'

is there something that i can do for a better investigation?

Option to not have colors in output

The Xcode plugin logs the output to system.log where it looks a bit ugly with those escapes. Maybe it is even possible to detect when stdout/stderr is redirected to a pipe and deactivate the escapes automatically?

Getting dyld warnings when I run synx in El Capitan

dyld: warning, LC_RPATH @executable_path/../../../../../../../SharedFrameworks in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/../../..//DVTInstrumentsFoundation.framework/Versions/A/DVTInstrumentsFoundation being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core being ignored in restricted program because of @executable_path

The app still works, it just gives me those warnings before it runs.

El Capitan Install Issue

Get the following error when installing on OS X 10.11:

ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj

Solved it by adding -n /usr/local/bin/xcodeproj to the gem install sync command. Might want to update install directions. Also, there could be a better way to solve this.

Better error handling for exclusion name

Failure:

synx -p -e "Pods" myproj.xcodeproj 
/Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:98:in `prepend': can't modify frozen String (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:98:in `block in group_exclusions='
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:96:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:96:in `group_exclusions='
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:50:in `set_options'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:16:in `sync'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:16:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:6:in `<top (required)>'
    from /usr/bin/synx:23:in `load'
    from /usr/bin/synx:23:in `<main>'

The correct invocation is:

synx -p -e "/Pods" myproj.xcodeproj

It would be better to check for a string without a starting / and either error out with a descriptive notice, or even prepend the / automatically.

Quiet option

Currently, output on the console is quite noisy :)

synx breaks project git repo

It would be nice if synx could detect a git repo and do the right thing (git mv, etc) instead of just copying and deleting everything -- git thinks everything was just deleted and I have to manually re-add everything.

Breaks git after running

After running synx, the .git folder seems to get destroyed. It is still there, but git does not recognize it as such.
I do not get any error messages during the run.

This is a rough distribution of our product, as seen in XCode:

touchapp/   (This is the project file)
    a.bundle
    b.bundle

    Localizable.strings/
        LanguageA.strings (Base)
        LanguageB.strings
        LanguageC.strings

    Images/
        (Just a bunch of images)

    touch/
        Images.xcassets (Launch images, application icons and whatnot)
        SomeGroupWithSomeCode/
            code.h
            code.m
            SubgroupWithSomeMoreCode/
                subcode.h
                subcode.m
        SomeGroupWithSomeMoreCode/
             morecode.h
             morecode.m

    Libraries/
        (A number of git submodules, but also some none libraries and some other external code files)
        (Some have their own .xcodeproj, some have subprojects of their own as well)
    Frameworks/
    Products/

This is roughly how it is reflected in filesystem:

touchapp/
    .git/
    .gitignore
    .gitmodules
    touch.xcodeproj/
    touch/
        LibraryA/
            LibraryA.xcodeproj/
            somecodefromlibrary.h
            somecodefromlibrary.m
        LibraryB/
            (Basically the same as Library A)
        LibraryC/
            libraryheaders.h
            somecode.c
        LanguageA.lproj/
            Localizable.strings
        LanguageB.lproj/
            Localizable.strings
        LanguageC.lproj/
            Localizable.strings
    Images/
    Inline Icons/
    CodeFromExternalParty/
        somecode.h
        somecode.m
    Animation/
    image1.png
    image2.png (and so on for about 50 times)

Add a --version (-v) switch to know which version is installed

Add a

--version -v 

switch to know which version is installed. That way, one can update the gem without having to know anything about Ruby/Gem management.

I know typing gem list | grep synx will show the version. Maybe run this command doing a system() call?

Disclaimer: I've never, ever, done any Ruby dev. Not even "Hello, World!". Please, bear with me.

xibs moved into wrong folder?

screen shot 2014-07-14 at 11 56 42

screen shot 2014-07-14 at 11 58 04

After a default synx project.xcproject I ended up with a lot of the xibs into what could have been the first reference for a folder for the xibs.

screen shot 2014-07-14 at 12 04 11

An '--only' / '--include' option

synx allows the user to exclude certain Xcode groups from being synx-ed with an '-e' option. I think it would sometimes be useful to be able to say: only synx these groups — hence, an '--only' / '--include' option.

The reason why I would find it useful is because with a non-trivial project running synx can screw up quite a lot of Xcode configuration and then it takes some time to fix up everything. Running it group-by-group would make the process smoother. Another reason: I have iOS and Mac groups and targets in a single project. When I'm working on iOS, I really don't want to touch Mac files. And vice versa.

What do you think?

Alphabetize entries inside groups

It's annoying how entries aren't forced into alphabetization in Xcode like they are on the file system. There is a 'sort by name' option if you right click on a folder -- it'd be cool to automatically do this.

Problem with -e option

It does not exclude file from sync, but deletes them from filesystem. Am I doing something wrong?

Xcode plugin

This should really be a plugin, not a separate tool :).

If you need/want help with that, just ping me.

Add a --dry-run option for check structural differences before committing

I'd love if synx had a --dry-run flag for only outputting what would be the final folder structure, instead of actually doing it straight off.

I might be able to add this in myself and create a pull-request later, but I'm too busy with work at least for this week so I can't do it right now.

Getting 'NoMethodError' when try to run on our project

I'm getting this error:

/Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/abstract_object.rb:18:in `work_pathname': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/pbx_variant_group.rb:18:in `sync'
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:20:in `block in sync'
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:20:in `each'
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:20:in `sync'
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/bin/synx:16:in `execute'
    from /Users/mark/.rvm/gems/ruby-2.1.2@global/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Users/mark/.rvm/gems/ruby-2.1.2@global/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Users/mark/.rvm/gems/ruby-2.1.2@global/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Users/mark/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/bin/synx:6:in `<top (required)>'
    from /Users/mark/.rvm/gems/ruby-2.1.2/bin/synx:23:in `load'
    from /Users/mark/.rvm/gems/ruby-2.1.2/bin/synx:23:in `<main>'
    from /Users/mark/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/mark/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

I get this whenever I try to run synx on our project.

The end result is not good either - it seems that it simply removes all the files it would try to move and leaves it at that.

I am completely unfamiliar with ruby or what not, so if I'm doing something wrong with my setup please tell me. :)

Localizable Strings folder got moved wrongly

I have a strings file that seemed to be with both folders group and file correctly set

screenshot 2
screenshot

But after executing

$ synx <Project Name>.xcodeproj

Another en.lproj folder was created and the existing en.proj was mode to it.

screenshot 3

Also, the project was not updated to reflect this change. You can see it due as git status do not showing the project file being changed and also the screenshot bellow. (this was good, otherwise I would not realize that the changes were wrong)

screenshot 4

Support JSON pbxproj files.

CocoaPods converts pbxproj files into JSON format (which Xcode recognizes). xcodeproj, however, crashes when trying to read the file as a plist.

/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:172:in `read_plist': Unable to read data from `"/Path/To/Projext/project.pbxproj"' (ArgumentError)
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:172:in `initialize_from_file'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:93:in `open'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:15:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:6:in `<top (required)>'
    from /usr/bin/synx:23:in `load'
    from /usr/bin/synx:23:in `<main>'

undefined method `each_build_settings'

Do you need more information to help debug?

    Supporting Files/
      skipped Bowtie-Prefix.pch
/Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_file_reference.rb:53:in `block in change_build_settings_reference': undefined method `each_build_settings' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x007fc8899b55b0> (NoMethodError)
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_file_reference.rb:52:in `each'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_file_reference.rb:52:in `change_build_settings_reference'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_file_reference.rb:19:in `sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:18:in `block in sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:18:in `each'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:18:in `sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:19:in `block in sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:19:in `each'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/pbx_group.rb:19:in `sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/project.rb:19:in `block in sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/project.rb:19:in `each'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/lib/synx/project.rb:19:in `sync'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/bin/synx:15:in `execute'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Users/ian/.rvm/gems/ruby-2.1.2/gems/synx-0.0.3/bin/synx:6:in `<top (required)>'
    from /Users/ian/.rvm/gems/ruby-2.1.2/bin/synx:23:in `load'
    from /Users/ian/.rvm/gems/ruby-2.1.2/bin/synx:23:in `<main>'
    from /Users/ian/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/ian/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Prune option delete files in localizable files

Hi,

I have two localized files : Localizable.strings and InfoPlist.strings.

When I runned synx with the prune option, it removed my Localizable.strings in english. But strangely in InfoPlist.strings it removed all the languages except in english.
Of course, the correct behavior would be to not remove anything in this directories ;)

Any ideas ?

Thanks (and thanks for the tool ;) )

Preserve the projects .pbxproj format

It looks like when synx writes out the .pbxproj is writes it out as an XML plist.

Xcode of course can read this just fine but we're running into issues with the entire .pbxproj file being in conflict because apparently Xcode does not always convert it back to the native format.

After synx some png will be can not find

After synx, some png will be can not find in the old location.
But even I remove the reference and remove the file and add again, it will show there is a same name file. But nothing is at there.

I use Xcode 6.3.

UPDATED:
It caused by I had duplicate reference, After synx, it removed duplicate reference.
Then got the error.
Now I removed duplicate reference, then synx and it's OK.
Thanks for good tool.

LoadError

I'm getting the following error when using synx on my project (Xcode 6.1, 10.10). My project does not use CocoaPods.

synx MyProject.xcodeproj/
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:4:in `<top (required)>'
    from /usr/bin/synx:23:in `load'
    from /usr/bin/synx:23:in `<main>'

Synx fails to run: "Plist contains a hash value object type unsupported by Xcodeproj."

I tried running Synx on a test Xcode project, and I got this:

% synx Dreary\ Alpaca.xcodeproj
/usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:172:in `read_plist': Plist contains a hash value object type unsupported by Xcodeproj. (TypeError)
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:172:in `initialize_from_file'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:93:in `open'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/synx-0.0.51/bin/synx:14:in `execute'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /usr/local/Cellar/ruby20/2.0.0-p481/lib/ruby/gems/2.0.0/gems/synx-0.0.51/bin/synx:6:in `<top (required)>'
    from /usr/local/opt/ruby20/bin/synx:23:in `load'
    from /usr/local/opt/ruby20/bin/synx:23:in `<main>'

Source is available at http://cl.ly/2L1x153k2a0F. Let me know if you need any more info.

synx XCode 6.3 project format support

Are there plans to make synx compatible with the XCode 6.3-compatible project format? I noticed that I got some Ruby (I think) errors when trying to synx a project with that format that went away once I chose the older 3.2 format.

Option for excluding specified groups (--exclusion, -e) doesn't function.

Following the usage as specified in the example: $ synx -p -e=OCMock/Core -e=OCKMockTests Source/OCMock.xcodeproj produces the following error output:

$ synx -p -e=Shared CBTest.xcodeproj
/Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/lib/synx/project.rb:88:in block in group_exclusions=': No group =Shared exists (IndexError) from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/lib/synx/project.rb:81:ineach'
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/lib/synx/project.rb:81:in group_exclusions=' from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/lib/synx/project.rb:37:inset_options'
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/lib/synx/project.rb:16:in sync' from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/bin/synx:15:inexecute'
from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:inrun'
from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:in Clamp' from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.4/bin/synx:6:in<top (required)>'
from /usr/bin/synx:23:in load' from /usr/bin/synx:23:in

'

If '=' is removed (like the --help usage suggests):
$ synx -p -e Shared CBTest.xcodeproj
the option is completely ignored and specified group is synced anyway.

Crashes on mkdir (File exists @ dir_s_mkdir)

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

A strange error

Hello,

I used SYNX to great success before but in my current project It just doesn't work.

Here's the error log:

/Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/abstract_object.rb:18:in work_pathname': undefined method[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/pbx_variant_group.rb:18:in sync' from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:inblock in sync'
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:in each' from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/lib/synx/project.rb:20:insync'
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:16:in execute' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:67:inrun'
from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp/command.rb:125:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.3/lib/clamp.rb:6:inClamp'
from /Library/Ruby/Gems/2.0.0/gems/synx-0.0.52/bin/synx:6:in <top (required)>' from /usr/bin/synx:23:inload'
from /usr/bin/synx:23:in `

'

Could you help?

Renames .strings files into .xib and .storyboard for projects with Base localization

#63 fix does not supports base localization (by default from Xcode 5). This type of localization uses ".strings" files to collect localizable strings for .xib and .storyboard files.

If I have structure like this:
Base.lproj/myview.xib
en.lproj/myview.strings
ru.lproj/myview.strings

after synx I get:
Base.lproj/myview.xib
en.lproj/myview.xib
ru.lproj/myview.xib

Localization tables are just renamed. To fix this synx just shouldn't rename this files but keep their original names.

Allow for use as a CI tool to check for accidental files / directory issues

It would be awesome if synx could be run on every continuous integration of your build in a way that exited with an error code if there has been a file that was added to the repo that doesn't match the directory structure or wasn't properly included into the project. This way, synx would only have to be run once to actually clean up your project, but then could be run continuously afterwards to ensure that your project stays clean. Let me know what you think, or if there's already an easy way to accomplish this.

Thanks for the amazing tool! Love the stuff that's been coming out of Venmo recently.

Exclusions don't work (frozen strings cannot be prepended)

Here's the runtime error I'm getting:

$ synx --exclusion "Vendor" ~/Desktop/Test/Test.xcodeproj
/Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:98:in `prepend': can't modify frozen String (RuntimeError)
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:98:in `block in group_exclusions='
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:96:in `each'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:96:in `group_exclusions='
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:50:in `set_options'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/lib/synx/project.rb:16:in `sync'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/bin/synx:16:in `execute'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/clamp-0.6.3/lib/clamp.rb:6:in `Clamp'
    from /Users/a2/.rvm/gems/ruby-2.1.2/gems/synx-0.0.52/bin/synx:6:in `<top (required)>'
    from /Users/a2/.rvm/gems/ruby-2.1.2/bin/synx:23:in `load'
    from /Users/a2/.rvm/gems/ruby-2.1.2/bin/synx:23:in `<main>'
    from /Users/a2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/a2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Integrate with source control.

synx, now, will move the files on disk but will completely obliterate git history.

Maybe synx can git mv the files in their new directories on move?

If group name contains "/" running synx with -p option breaks the project file integrity.

If group name has "/" character in it, the first time synx command is executed everything seems fine. However the following happens:

  1. Folder name for the corresponding group contains only the part before "/".
  2. All files are moved inside a subfolder of the above folder, which name contains only second half of the original group name (past "/").
  3. Original group's name stayed unchanged. Xcode project file references for the contents of the original group pointed to the subfolder created in (2).

If project groups structure is modified and synx command is executed again with -p option the following happens:

  1. Another folder is created at the project root which is 100% copy of subfolder described above in (2).
  2. All files from subfolder (2) are removed as not being referenced by Xcode which ultimately breaks the project file and project will no longer compile

So in my case group's name was "Dashboard Header / Footer".
After first run: "Dashboard Header " with subfolder " Footer" got created and all files were moved to " Footer" subfolder, group "Dashboard Header / Footer" was now pointing to " Footer" subfolder, Xcode references were fine, project compiled.
After creating a new group somewhere else in the project and executing synx again, files from " Footer" subfolder got removed from disk, and " Footer" with identical contents was created in the root directory, however project file references were not updated, so the contents of "Dashboard Header / Footer" group got highlighted in red.

Support for Git Move/SVN Move, etc.

First of all, grats on a great first release!

I'm sure you saw this coming, but support for various version control mv operations would be hugely helpful. That would allow this to be a common operation in a mature source control environment. As it is, I would consider this more of a "lets just fix this darn project" operation that I would run once initially rather than an ongoing maintenance tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.