Molinillo 0.6.0 breaks ruby solver
ChiefAlexander opened this issue · 8 comments
The update to Molinillo 0.6.0 appears to have broken the ruby solver.
https://github.com/CocoaPods/Molinillo/blob/master/CHANGELOG.md#breaking
Locking down Molinillo to 0.5.7 allows berks to resolve successfully.
Example error with Molinillo 0.6.0:
/Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/solve-3.1.0/lib/solve/ruby_solver.rb:80:in `block in resolve': undefined method `name' for nil:NilClass (NoMethodError)
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/solve-3.1.0/lib/solve/ruby_solver.rb:79:in `each'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/solve-3.1.0/lib/solve/ruby_solver.rb:79:in `inject'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/solve-3.1.0/lib/solve/ruby_solver.rb:79:in `resolve'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/solve-3.1.0/lib/solve.rb:64:in `it!'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/resolver.rb:78:in `resolve'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/installer.rb:181:in `install_from_universe'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/installer.rb:43:in `run'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/berksfile.rb:426:in `install'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/cli.rb:140:in `install'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/cli.rb:49:in `dispatch'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/lib/berkshelf/cli.rb:25:in `execute!'
from /Users/ah042823/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/berkshelf-6.2.1/bin/berks:5:in `<top (required)>'
from /Users/ah042823/.rbenv/versions/2.3.1/bin/berks:23:in `load'
from /Users/ah042823/.rbenv/versions/2.3.1/bin/berks:23:in `<main>'
Pulling solve from master seems to get around this and work normally because of #66. Although, that PR mentions the 0.6.0 release was supposed to fix this error, not make it occur more often...
(might help people find this when searching for the issue)
Discovered with berks install
/ berks update
crashing with an error like:
/usr/local/var/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/solve-3.1.0/lib/solve/ruby_solver.rb:80:in
block in resolve': undefined method
name' for nil:NilClass (NoMethodError)
I've pushed solve 3.1.1 that should resolve this.
@thommay the update pushed does not fix the issue it only masks it. Now instead of failing resolution will complete, but only a subset of all dependencies in the chain will be resolved.
Indeed the only known workaround for now is to constrain molinillo gem to < 6.0
I won't pretend to know much of anything about depsolving, but this is the commit that started solve getting a bunch of nil artifacts: CocoaPods/Molinillo#75
thanks; I'm working my through figuring out why we're seeing these nulls.
Released solve 4.0.0 that resolves this.