Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

depcheck analyse fails with undefined method 'each' for nil:NilClass #6

Closed
ldiqual opened this issue Aug 27, 2016 · 3 comments
Closed

Comments

@ldiqual
Copy link

ldiqual commented Aug 27, 2016

$ depcheck analyze --workspace App.xcworkspace --scheme App
/Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/analyzer.rb:29:in `block (2 levels) in generate_dependencies': undefined method `each' for nil:NilClass (NoMethodError)
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/analyzer.rb:26:in `each'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/analyzer.rb:26:in `block in generate_dependencies'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/analyzer.rb:10:in `each'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/analyzer.rb:10:in `generate_dependencies'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/lib/depcheck/command/analyze_command.rb:13:in `execute'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:in `execute'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
        from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/depcheck-0.1.0/bin/depcheck:16:in `<top (required)>'
        from /Users/ldiqual/.rbenv/versions/2.3.0/bin/depcheck:23:in `load'
        from /Users/ldiqual/.rbenv/versions/2.3.0/bin/depcheck:23:in `<main>'
@wojteklu
Copy link
Owner

Thanks for the issue. Could you sent me project with the problem? Which swift version do you use?

@ldiqual
Copy link
Author

ldiqual commented Aug 27, 2016

@wojteklu Unfortunately it is a closed-source project so I can't share it here.

Swift version:

Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9

Will try to find a similar project that fails.

@wojteklu
Copy link
Owner

@ldiqual I fixed the problem by adding fallback for nil value. However it would be cool to know file structure with mentioned error. Please check the newest version. Thanks!

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

No branches or pull requests

2 participants