Avoid hitting RubyGems remotes when all missing gems are in --without groups#5806
Avoid hitting RubyGems remotes when all missing gems are in --without groups#5806bundlerbot merged 4 commits intomasterfrom
Conversation
|
Any chance we can also skip checking out git sources if they only contain gems that are excluded? That would fix the regression I found in 1.8 last year :P |
I don't know how well I can make that work with |
|
@segiddins that's when there's no lockfile and Bundler needs to use the gemspec from that git repo to successfully resolve. I'm talking about when we're running in deployment/frozen mode, and there's already a lock, so we don't actually need the gemspec for the without gem. |
81077bd to
65aecf5
Compare
|
@indirect I think I did it? |
|
🎉 |
|
r? |
|
My test for the regression is still failing inside |
|
(The repro is here if you want to see it for yourself: https://gist.github.com/indirect/1cc86d686f40a40d68b895834ab11cf6) |
|
That looks like a different issue? That gemfile doesn't have any Git sources. |
|
Lol I think I have a fix for it anyways |
|
lol 🙌🏻 |
…source is missing
|
@indirect take a look :P |
65aecf5 to
1947060
Compare
|
you did it! 🎉🎉🎉 |
|
@bundlerbot r+ |
|
📌 Commit 1947060 has been approved by |
Avoid hitting RubyGems remotes when all missing gems are in --without groups ### What was the end-user problem that led to this PR? The problem was we would attempt to fetch dependency info from a RubyGems remote even when it was only needed for gems whose groups were excluded. ### Was was your diagnosis of the problem? My diagnosis was that the test we had for this case was insufficient, since it checked only that `stderr` was empty, and since Bundler 1 prints errors to `stdout`... it went undetected for a year. ### What is your fix for the problem, implemented in this PR? My fix is to only report that deps are missing when they are either requested or are path/git/gemspec-sourced. ### Why did you choose this fix out of the possible options? I chose this fix because it keeps the behavior of always ensuring all git repos are checked out.
|
☀️ Test successful - status-travis |
What was the end-user problem that led to this PR?
The problem was we would attempt to fetch dependency info from a RubyGems remote even when it was only needed for gems whose groups were excluded.
Was was your diagnosis of the problem?
My diagnosis was that the test we had for this case was insufficient, since it checked only that
stderrwas empty, and since Bundler 1 prints errors tostdout... it went undetected for a year.What is your fix for the problem, implemented in this PR?
My fix is to only report that deps are missing when they are either requested or are path/git/gemspec-sourced.
Why did you choose this fix out of the possible options?
I chose this fix because it keeps the behavior of always ensuring all git repos are checked out.