summaryrefslogtreecommitdiff
path: root/lib/bundler/source
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Remove one fallback to full indexes on big gemfilesDavid Rodríguez2023-04-071-8/+5
| | | | | | | | | | | | | | | | | | | If Gemfile has a lot of dependencies, we have an optimization that uses the full index in that case, assuming it's going to be faster. I think this is an old optimization that predates compact index API times, I believe we no longer need it these days. Also, since a few releases ago we check for circular dependencies when resolving by looping through all versions of each name and removing those that have circular dependencies that would trip up the resolver. This loop becomes actually very slow when full indexes are used because to find dependencies of a gemspec, we need to explicitly fetch the marshaled gemspec (`gemspec.rz` endpoint) for it, so the optimization has the opposite effect of making things very slow. https://github.com/rubygems/rubygems/commit/2f46289bd3
* When running `bundle lock --update <name>`, checkout locked revision of ↵David Rodríguez2023-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | unrelated git sources directly Since Bundler 2.4, we will try to checkout any branch specified in the Gemfile, while until Bundler 2.3 we would directly checkout the locked revision. This should not make any difference in most situations, but in some edge cases, like if the branch specified in the `Gemfile` has been renamed, but the locked revision still exist, it causes an error now while before it would update the lockfile without issues. I debated which behavior was best, since I was not sure. But my conclusion is that if the situation does not require expiring the lockfile source in favor of the Gemfile source, we should use the locked revision directly and proceed happily. So I restored Bundler 2.3 behavior. I think this is consistent with how yanked gems are handled, for example. Of course, if explicitly updating the git source itself, or all gems, we will still get any errors like missing branches related to the git source.
* Normalize git sourcesDavid Rodríguez2023-03-172-3/+2
| | | | | Just like gem sources, a "style-only" change, like adding a trailing slash, should not expire them.
* [rubygems/rubygems] Respect --no-install option for git: sourcesJulie Haehn2023-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the --no-install option to `bundle package` is totally ignored for git sources. This can have very strange effects if you have: - a git-sourced gem, - with native extensions, - whose extconf.rb script depends on another gem, - which is installed from Rubygems in the gemfile. In that circumstance, `bundle package --no-install --all` will download the Rubygems dependencies to `vendor/cache` but NOT install them. It will also check out the git gems to `vendor/cache` (good), and attempt to build their native extensions (bad!). The native extension build will fail because the extconf.rb script crashes, since the dependency it needs is missing. I implemented a fix for this in `source/git.rb`, since this is analogous to what's happening in `source/rubygems.rb`. I do admit though the whole thing is a little strange though - an "install" method that.... proceeds to look at a global flag to not install anything. Add test to confirm cache respects the --no-install flag https://github.com/rubygems/rubygems/commit/5a77d1c397 Co-authored-by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
* [rubygems/rubygems] Give a better message when Gemfile branch does not existDavid Rodríguez2023-02-211-4/+16
| | | | https://github.com/rubygems/rubygems/commit/cb4fc41cbc
* [rubygems/rubygems] Restore better error message when locked ref does not existDavid Rodríguez2023-02-211-4/+6
| | | | https://github.com/rubygems/rubygems/commit/c8e024359f
* Merge RubyGems/Bundler master.Hiroshi SHIBATA2023-01-311-1/+1
| | | | Pick from https://github.com/rubygems/rubygems/commit/5ace20dbecfeaf09fba5f616193f3cfcff70ba00
* Merge RubyGems and Bundler masterHiroshi SHIBATA2023-01-101-1/+1
| | | | from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609
* Update Bundler to 2.4.1 & and RubyGems to 3.4.1David Rodríguez2022-12-251-14/+17
|
* Merge RubyGems-3.4.0 and Bundler-2.4.0Hiroshi SHIBATA2022-12-241-19/+14
|
* Merge RubyGems/Bundler masterHiroshi SHIBATA2022-12-201-29/+36
| | | | Pick from https://github.com/rubygems/rubygems/commit/ba3adad4d80038ffd7bea015da2f11d3e8a2ff82
* Merge RubyGems/Bundler masterHiroshi SHIBATA2022-12-152-22/+48
| | | | Pick from https://github.com/rubygems/rubygems/commit/084f7d1f21f6fc3e2bb685b7bda3653fb2891c6e
* Merge RubyGems/Bundler masterHiroshi SHIBATA2022-12-124-13/+11
| | | | from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
* Merge RubyGems/Bundler masterHiroshi SHIBATA2022-12-092-42/+141
| | | | Pick from https://github.com/rubygems/rubygems/commit/823c776d951f3c35094611473ec77f94e8bf6610
* Migrate our resolver engine to PubGrubHiroshi SHIBATA2022-11-121-1/+0
| | | | | | https://github.com/rubygems/rubygems/pull/5960 Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
* Resync Bundler & RubyGemsDavid Rodríguez2022-09-081-6/+6
|
* Merge ↵Hiroshi SHIBATA2022-09-053-87/+8
| | | | https://github.com/rubygems/rubygems/commit/16c3535413afebcdbab7582c6017c27b5da8a8dc
* Merge rubygems master from ↵Hiroshi SHIBATA2022-07-291-1/+1
| | | | https://github.com/rubygems/rubygems/commit/446cc57a7ccdf1924deb291be9571219e7ba8523
* [rubygems/rubygems] Account for default gems not having remote when cachingDavid Rodríguez2022-07-021-6/+12
| | | | https://github.com/rubygems/rubygems/commit/b93d4de2ff
* [rubygems/rubygems] Move rubygems source specific logic to rubygems sourceDavid Rodríguez2022-07-021-1/+1
| | | | https://github.com/rubygems/rubygems/commit/6aa4c422a7
* Sync RubyGems & Bundler with upstream repoDavid Rodríguez2022-06-241-7/+5
|
* [rubygems/rubygems] Fix `bundle package --no-install` no longer skipping installDavid Rodríguez2022-06-231-0/+2
| | | | | | | | | | | | This is a regression from https://github.com/rubygems/rubygems/commit/cf749f8ffabd. The funny thing is that we have a spec for this feature, so it was unclear how we regressed here. It turns out there was a bug in one of our negative matchers checking that gems ARE NOT included in a bundle. This commit fixes the bug in the negative matcher and reverts https://github.com/rubygems/rubygems/commit/cf749f8ffabd (with a slightly simpler diff). https://github.com/rubygems/rubygems/commit/3f9a4ff32a
* [rubygems/rubygems] Reuse package from the installer for extracting the ↵David Rodríguez2022-06-111-18/+25
| | | | | | | | | | specification Previously we would instantiate two different packages and extract the specification from the package twice for each gem installed. We can reuse the installer for this so that we just need to do it once. https://github.com/rubygems/rubygems/commit/e454f850b1
* [rubygems/rubygems] Move security exception handling to the only place using itDavid Rodríguez2022-06-111-0/+4
| | | | https://github.com/rubygems/rubygems/commit/ba975b3b7f
* [rubygems/rubygems] Swapping should not raise any errorsDavid Rodríguez2022-06-111-1/+2
| | | | https://github.com/rubygems/rubygems/commit/600a9ac658
* [rubygems/rubygems] Remove unclear commentDavid Rodríguez2022-06-111-2/+0
| | | | | | | This is the explanation of why we do the swapping, not of why we download the gem. https://github.com/rubygems/rubygems/commit/1a25eb7e7b
* [rubygems/rubygems] `Gem::Specification.loaded_from` is already set by the ↵David Rodríguez2022-06-111-13/+4
| | | | | | installer https://github.com/rubygems/rubygems/commit/796eebfdbf
* [rubygems/rubygems] Refactor some more duplicated logicDavid Rodríguez2022-06-111-3/+7
| | | | https://github.com/rubygems/rubygems/commit/9bd389e1b6
* [rubygems/rubygems] Move `no_install` setting check to a more sensible placeDavid Rodríguez2022-06-111-50/+48
| | | | | | | It's only related to the `bundle cache` command, so it should be checked there. https://github.com/rubygems/rubygems/commit/cf749f8ffa
* [rubygems/rubygems] No need to redownload if package already thereDavid Rodríguez2022-06-111-0/+1
| | | | https://github.com/rubygems/rubygems/commit/285ccbc07e
* [rubygems/rubygems] No need to overwrite path when there's a remoteDavid Rodríguez2022-06-111-2/+3
| | | | https://github.com/rubygems/rubygems/commit/d86fb2c316
* [rubygems/rubygems] Remove unnecessary `spec.remote` guardDavid Rodríguez2022-06-111-2/+0
| | | | | | It's checked before calling the method already. https://github.com/rubygems/rubygems/commit/4eb00e9586
* [rubygems/rubygems] Refactor ambiguous gems checkDavid Rodríguez2022-06-111-3/+1
| | | | https://github.com/rubygems/rubygems/commit/a00c79a4da
* [rubygems/rubygems] Fix crash when installing gems with symlinksDavid Rodríguez2022-05-301-1/+1
| | | | | | | | | | | | | | | If BUNDLE_PATH is configured to a symlinked path, installing gems with symlinks would crash with an error like this: ``` Gem::Package::SymlinkError: installing symlink 'man/man0/README.markdown' pointing to parent path /usr/home/stevewi/srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0/README.markdown of /srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0 is not allowed ``` This commit fixes the problem by changing the bundle path to be the realpath of the configured value, right after we're sure the path has been created. https://github.com/rubygems/rubygems/commit/3cd3dd142a
* Merge RubyGems and Bundler HEADHiroshi SHIBATA2022-05-201-1/+1
| | | | https://github.com/rubygems/rubygems/commit/125415593ead9ab69a9f0bb5392c9d7ec61b1f51
* [rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` ↵David Rodríguez2022-05-133-8/+11
| | | | | | | | | install output The lockfile is completely ignored in inline mode, yet the previous output would suggest it wasn't. https://github.com/rubygems/rubygems/commit/763125a745
* [rubygems/rubygems] Normalize parameter nameDavid Rodríguez2022-05-131-4/+4
| | | | | | The other sources use `options` which reads better. https://github.com/rubygems/rubygems/commit/a672f9d602
* Merge ↵Hiroshi SHIBATA2022-04-281-1/+1
| | | | https://github.com/rubygems/rubygems/commit/3f7d0352e84b29d4a2d4cd93b31e5ebdb5f79cc6
* Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5Hiroshi SHIBATA2022-04-281-1/+1
|
* Track RubyGems 3.4.0dev and Bundler 2.4.0devHiroshi SHIBATA2021-12-271-1/+1
|
* Check if `Kernel#untaint` is defined instead of version comparisonNobuyoshi Nakada2021-12-271-1/+1
| | | | Probably `RUBY_VERSION` seems overwritten somewhere in the tests.
* Merge RubyGems-3.3.0 and Bundler-2.3.0Hiroshi SHIBATA2021-12-211-1/+1
|
* [rubygems/rubygems] Pass "--" to git commands to separate positional and ↵David Rodríguez2021-12-071-2/+2
| | | | | | | | | optional args To make sure git uri's specified in Gemfile are never misinterpreted as optional arguments, potentially allowing for local code execution. https://github.com/rubygems/rubygems/commit/90b1ed8b9f
* [rubygems/rubygems] Improve sources representationDavid Rodríguez2021-12-032-8/+12
| | | | | | | | | | | | | We have two representations of a source. Once used for sorting, which should not depend on the source's state, but solely on its static information, like remotes. Another one used for error and informational messages, which should properly inform about the exact state of the source when the message is printed. This commit makes the latter be the default implementation of `to_s`, so that error and informational messages are more accurate by default. https://github.com/rubygems/rubygems/commit/b5f2b88957
* Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbdHiroshi SHIBATA2021-12-011-5/+5
|
* [rubygems/rubygems] Better error when installing a git lockfile and git not ↵David Rodríguez2021-10-301-2/+5
| | | | | | present https://github.com/rubygems/rubygems/commit/28f4842196
* [rubygems/rubygems] Only delete cached gem when it's corruptedDavid Rodríguez2021-10-291-1/+1
| | | | | | | | Rescuing all errors here might end up hiding other errors if the deletion of the cached gem itself raises an error for some reason. Let's be more conservative. https://github.com/rubygems/rubygems/commit/3d80dfba08
* [rubygems/rubygems] Improve readability by splitting updating the cache and ↵David Rodriguez2021-10-251-1/+4
| | | | | | searching it https://github.com/rubygems/rubygems/commit/d0df25bb0f
* [rubygems/rubygems] Manage global gem cache directlyDavid Rodriguez2021-10-251-40/+17
| | | | | | | | Previously, it was maintained in sync with the standard cache. That was less efficient, and it caused some error messages to point to non existent files. https://github.com/rubygems/rubygems/commit/931f8cb8a9
* [rubygems/rubygems] Cached gem path resolution should consider default gemsDavid Rodriguez2021-10-251-9/+6
| | | | https://github.com/rubygems/rubygems/commit/83b2b845b3