bazel-ios / cocoapods-bazel

A Cocoapods plugin for automatically generating Bazel BUILD files
Apache License 2.0
110 stars 21 forks source link

Can't install cocoapods-bazel #76

Open Tyler-Keith-Thompson opened 2 years ago

Tyler-Keith-Thompson commented 2 years ago
Screen Shot 2022-07-27 at 4 59 02 PM

When trying to install I receive an error:

ERROR:  While executing gem ... (NoMethodError)
    undefined method `request' for nil:NilClass

    [@failed_dep.dependency, @activated.request.dependency]
thiagohmcruz commented 2 years ago

AFAIK this tool has been tested mostly with ruby 2.x so maybe there's some work required to support ruby 3.x. Found similar issues online, e.g., this and this.

You could try to downgrade your ruby version to check if that's what is happening here. If that's the case we probably need to see what is required to support ruby 3.x (i.e. what dependencies are broken on the new ruby), PRs are welcomed!

chenxiao0228 commented 1 year ago

hit this when I was trying to upgrade our internal bundle.

I was having a hard time building ruby 2.x with Xcode 14 and Ventura. so I upgraded Ruby to 3.2.0. The stacktrace is like this

ERROR: While executing gem ... (NoMethodError) undefined methodrequest' for nil:NilClass

[@failed_dep.dependency, @activated.request.dependency]
                                   ^^^^^^^^
ruby-install/lib/ruby/3.2.0/rubygems/resolver/conflict.rb:47:in `conflicting_dependencies'
ruby-install/lib/ruby/3.2.0/rubygems/exceptions.rb:61:in `conflicting_dependencies'
ruby-install/lib/ruby/3.2.0/rubygems/exceptions.rb:55:in `initialize'
ruby-install/lib/ruby/3.2.0/rubygems/resolver.rb:193:in `exception'
ruby-install/lib/ruby/3.2.0/rubygems/resolver.rb:193:in `raise'
ruby-install/lib/ruby/3.2.0/rubygems/resolver.rb:193:in `rescue in resolve'
ruby-install/lib/ruby/3.2.0/rubygems/resolver.rb:191:in `resolve'
ruby-install/lib/ruby/3.2.0/rubygems/request_set.rb:411:in `resolve'
ruby-install/lib/ruby/3.2.0/rubygems/dependency_installer.rb:333:in `resolve_dependencies'
ruby-install/lib/ruby/3.2.0/rubygems/commands/install_command.rb:205:in `install_gem'
ruby-install/lib/ruby/3.2.0/rubygems/commands/install_command.rb:230:in `block in install_gems'
ruby-install/lib/ruby/3.2.0/rubygems/commands/install_command.rb:223:in `each'
ruby-install/lib/ruby/3.2.0/rubygems/commands/install_command.rb:223:in `install_gems'
ruby-install/lib/ruby/3.2.0/rubygems/commands/install_command.rb:169:in `execute'
ruby-install/lib/ruby/3.2.0/rubygems/command.rb:323:in `invoke_with_build_args'
ruby-install/lib/ruby/3.2.0/rubygems/command_manager.rb:185:in `process_args'
ruby-install/lib/ruby/3.2.0/rubygems/command_manager.rb:149:in `run'
ruby-install/lib/ruby/3.2.0/rubygems/gem_runner.rb:51:in `run'
build/ruby-install/bin/gem:17:in `<main>'

` seems like an edge case triggered by some dependency conflict. going to look closer

chenxiao0228 commented 1 year ago

This will be resolved by https://github.com/segiddins/starlark_compiler/issues/10

For now we can workaround by gem build then install the main branch of startlark_compiler before installing cocoapods-bazel