Issue with bundler resolver

94 views
Skip to first unread message

Alex Sanford

unread,
Jan 11, 2013, 10:07:16 AM1/11/13
to ruby-b...@googlegroups.com
Hey guys,

I've been stuck with this issue for a while now, and I'm starting to think it's a bug in bundler. Here's what's happening:

- I pull down this code: git://github.com/locomotivecms/engine.git
- I checkout the latest RC: git checkout v2.0.0.rc12
- I run `bundle update` and get the following error:

Bundler could not find compatible versions for gem "devise":
  In Gemfile:
    locomotive_cms (>= 0) ruby depends on
      devise (~> 2.1.2) ruby

    locomotive_cms (>= 0) ruby depends on
      devise (2.2.0)


This project is a rails engine, and I have some insight into why this is happening. The gemspec for this engine requires both devise (~> 2.1.2) and devise-encryptable (~> 0.1.1). However, devise-encryptable 0.1.1 (which is the latest version right now) requires devise (>= 2.1.0.rc). Now, it appears that bundler activates devise-encryptable first, at which point it adds the dependency to devise (>= 2.1.0.rc). It then satisfies that dependency by activating devise 2.2.0. Finally, it gets around to trying to satisfy the original devise dependency (~> 2.1.2) and fails because 2.2.0 is already activated and not compatible.

This issue does not happen consistently. If I swap the two lines in the gemspec which add the dependencies to devise and devise-encryptable (i.e. change their order), then bundle update works fine. However, if I then update the rails version in the gemspec to 3.2.11, the error returns on bundle update.

It looks to me like this is a bug in the resolver. I've attached the output from `DEBUG_RESOLVER=y bundle update &> bundler.debug`. Should I log an issue on github? Is there something I'm overlooking?

Thanks!
Alex

Alex Sanford

unread,
Jan 14, 2013, 8:58:13 AM1/14/13
to ruby-b...@googlegroups.com
Sorry guys...I thought I attached the file but it seems like I'm not able to do so. You can take a look at the file here: https://gist.github.com/4530198

André Arko

unread,
Jan 14, 2013, 6:00:39 PM1/14/13
to ruby-b...@googlegroups.com
If you could open a ticket with the output, and the other things mentioned in bit.ly/bundler-issues, that would be great.

--
You received this message because you are subscribed to the Google Groups "ruby-bundler" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ruby-bundler/-/NuCLTHcuRa4J.
To post to this group, send email to ruby-b...@googlegroups.com.
To unsubscribe from this group, send email to ruby-bundler...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-bundler?hl=en.

Alex Sanford

unread,
Jan 15, 2013, 7:51:10 AM1/15/13
to ruby-b...@googlegroups.com
Thanks, Andre. Will do.

Hedge Hog

unread,
Jan 20, 2013, 10:15:14 PM1/20/13
to ruby-b...@googlegroups.com
Alex, can you take a look at issues #1113 and #1184 to see if what you have is as reported there, or even better how your issue differs.  
This should shed more light on the cause and scope of all these issues.

Thanks in advance
Hedge


Alex

--
You received this message because you are subscribed to the Google Groups "ruby-bundler" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ruby-bundler/-/roT6nDMT6coJ.

To post to this group, send email to ruby-b...@googlegroups.com.
To unsubscribe from this group, send email to ruby-bundler...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-bundler?hl=en.



--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
  Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://hedgehogshiatus.com

Alex Sanford

unread,
Jan 21, 2013, 11:13:38 AM1/21/13
to ruby-b...@googlegroups.com
Hmm...I hadn't seen those issues. It looks like my problem is the same thing. Both of these issues are very old...any idea if they're being worked on?

Hedge Hog

unread,
Jan 23, 2013, 4:07:19 PM1/23/13
to ruby-b...@googlegroups.com
On Tue, Jan 22, 2013 at 3:13 AM, Alex Sanford <alex.s...@gmail.com> wrote:
> Hmm...I hadn't seen those issues. It looks like my problem is the same
> thing. Both of these issues are very old...any idea if they're being worked
> on?

I'd say no, and also say think twice about diving in. Bundler is
great - no argument there.
Previously I've tried to add a feature. When that didn't work out, I
tried to fix a bug/issue. That also didn't work out.
The simple reason was that the project is complex and AFAICT it wasn't
written outside-in, so there is tons of behavior is implicit and
things break all over the place when you make even a small change -
and it is nigh impossible to work out from the specs what behavior is
expected, and why, in the parts you just broke.

I suspect this is the reason these important bugs are open after so
long. You really have to internalize implicit behavior to make head
way in the Bundler code base.

Of course this experience was more than a year ago. Hopefully things
have changed in the meantime? I just don't have time to repeat the
previous experiences.

Best wishes
Hedge
> https://groups.google.com/d/msg/ruby-bundler/-/52FdhCBD8L8J.
Reply all
Reply to author
Forward
0 new messages