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

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

Closed
felis-silvestris opened this issue May 30, 2014 · 9 comments

Comments

@felis-silvestris
Copy link

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.

@marklarr
Copy link
Member

Ah! I need to fix the docs. Try prefixing your exclusions with /, ie,

synx -p -e=/Shared CBTest.xcodeproj

@marklarr
Copy link
Member

It might be nice to make the option more lenient, too... maybe we should just prepend the / if they user doesn't provide it?

@felis-silvestris
Copy link
Author

Nope, "/" doesn't help, get the same error:
/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)

@felis-silvestris
Copy link
Author

Ok, this works:
$ synx -p -e /Shared CBTest.xcodeproj

@marklarr
Copy link
Member

Thanks! I fixed the readme.

I think then is some general sketchiness with the exclusion feature, so let me know if you see any other issues.

@felis-silvestris
Copy link
Author

Thanks for updating the readme! By the way, in the updated "Advanced" section example where is no "-p" option specified anymore, though the comment below it still references it:
"$ synx -e "/OCMock/Core Mocks" -e /OCMockTests Source/OCMock.xcodeproj/
if they wanted to not sync the /OCMock/Core Mocks and /OCMockTests groups, and also remove (-p) any image/source files found by synx that weren't ever referenced by any groups in Xcode."

@marklarr
Copy link
Member

Ah! Thanks!

@lowell
Copy link

lowell commented May 31, 2014

Okay, so, apparently the leading / is required. If I might make a suggestion, please make the requirement explicit or make the tool more forgiving, as suggested above. It (seemingly randomly) deleted headers and implementation files from folders both inside and outside the exclusion folder, and broke one of the submodule repos located in Vendor/, which locked up both Tower and Xcode. Strangely, git reset --hard restored only some of the deleted files; I ended up having to delete the entire folder and pulled down another clone of my project.

Anyway, thanks for sharing the project and have a great weekend! 🍻

@marklarr
Copy link
Member

marklarr commented Jun 1, 2014

Sorry about that! This should fix it #18

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

No branches or pull requests

3 participants