Odd behavior with/without --deployment option #4703
Comments
Awesome, thanks for the repro case? Quick question -- does this still happen in 1.13.0.pre.1? |
@segiddins Went to try it out, but even though I have 1.13.0.pre.1 installed, every time I bundle it installes 1.12.5 and tries to use that instead. Is there some trick to persuade things to use the prerelease version? |
|
Thanks @chrismo! That did the trick. Results were still the same on latest pre-release version.
|
@jasonrclark I can't recreate. Am I missing any steps? If not can you post your https://gist.github.com/chrismo/f6583f3a7f530eaed715abb28de8f7be |
@chrismo Hmm, my steps seem to have gotten off the path partway through. Your first Try this and see if it dups for you:
|
Ah - that does recreate:
|
This is a complicated one, /me taking a break. Been stepping through it for a while - somewhere But I could be wrong. I've been wrong about 3 times just today. ;) |
Thanks for all the digging @chrismo! I bet you're right that I'm asking something conflicting. I did a bit of digging myself, and the main point of divergence between the |
This method gets called many times, but the last time, as best I could tell, is where |
This correctly errors on
|
I noticed some peculiarities working with a local gem with and without using
--deployment
on installing our bundle. I've set up a demonstration repo at https://github.com/jasonrclark/odd-deployment.Note that the setup of my gem isn't quite standard (see section below), so maybe this is expected but I found at least part of what happened surprising.
The Behavior
If I run a normal
bundle install
I get this list of gems:However, if I run
bundle install --deployment
from a clean checkout I get a shorter list:Note that because of the version we're not getting our local gem
from source
, nor any of its dependencies.What's Weird in the Setup
We use papers to do license validation tests against our gems. Given that, I found it useful to provide a
Gemfile.lock
so we wouldn't have versions drifting in the test environment. This is non-standard for a gem, and is likely involved in the problem.The other oddity is that I've bumped the local
VERSION
constant for the gem, but haven't updated theGemfile.lock
yet. Obviously not the state things should be in longer term, but in another case I did check something in without updating and saw test failures because of missing dependencies... not what I'd expect.What Did I Expect?
I was surprised by the different behavior when passing or not passing
--deployment
. I can buy that bundler can't proceed because of the version mismatch, but maybe it could give a warning or error if it's excluding a local gem in this fashion?The text was updated successfully, but these errors were encountered: