venmo / synx Goto Github PK
View Code? Open in Web Editor NEWA command-line tool that reorganizes your Xcode project folder to match your Xcode groups
License: MIT License
A command-line tool that reorganizes your Xcode project folder to match your Xcode groups
License: MIT License
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?
Would be an awesome enhancement
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?
I'm happy to make a PR, just don't have time right now so putting this issue here so it's not forgotten.
Something like: CocoaPods/CocoaPods@0465aee
This is to prevent people running as root and having permission problems later.
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.
I'd love to see an option to reverse the process — retain Xcode's groupings, but flatten all of the directories into a single folder.
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.
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.
Currently, output on the console is quite noisy :)
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.
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. 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.
Could be committed into source control and synx would use the params found within for a particular project when doing its synchronization.
Would be particularly useful for projects that require a large number of exclusions.
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?
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.
It does not exclude file from sync, but deletes them from filesystem. Am I doing something wrong?
This should really be a plugin, not a separate tool :).
If you need/want help with that, just ping me.
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.
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. :)
I'm a beginner,as the title, I tried some method, but without success,thanks for your answer.
Had an old core data model in my project. Found this great library, run it over the project. Everything is great except it didn't found dead xcdatamodel file.
It would be great if this got added to the homebrew project. https://github.com/Homebrew/homebrew/wiki
I have a strings file that seemed to be with both folders group and file correctly set
But after executing
$ synx <Project Name>.xcodeproj
Another en.lproj
folder was created and the existing en.proj
was mode to it.
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)
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>'
Great tool! I think it would be beneficial to have Pods in the exclusion list by default. Thoughts?
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>'
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 ;) )
Something like the -n flag which shows you what files will be moved to where without actually moving them.
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.
😱
Also seems to break emoji paths 😭
https://www.dropbox.com/s/szk2z5wnzry63qg/everything-is-broken.tgz?dl=0
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.
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>'
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.
Does it support .xcworkspace along with .xcodeproj?
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.
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:in
each'
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:in
set_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: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.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.
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
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: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 `
Could you help?
#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.
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.
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>'
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?
It can be useful to have a way to check the correctness of the file structure without doing any actual changes.
If group name has "/" character in it, the first time synx command is executed everything seems fine. However the following happens:
If project groups structure is modified and synx command is executed again with -p option the following happens:
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.