aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Keep a single copy of the remembered flag deprecation ↵David Rodríguez2023-11-271-7/+7
| | | | | | message https://github.com/rubygems/rubygems/commit/cb4e26eabc
* [rubygems/rubygems] Avoid some unnecessary quotes in remember flag ↵David Rodríguez2023-11-271-1/+2
| | | | | | deprecation message https://github.com/rubygems/rubygems/commit/3fd627e486
* [rubygems/rubygems] Simplify remembered flags deprecation messageDavid Rodríguez2023-11-271-1/+1
| | | | | | Configuration is now local by default. https://github.com/rubygems/rubygems/commit/6bc7709aa8
* [rubygems/rubygems] Add missing --prefer-local to Synopsis in ↵Olle Jonsson2023-11-2630-30/+31
| | | | | | bundle-install.1.ronn https://github.com/rubygems/rubygems/commit/e956c5bbe4
* [rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins2023-11-261-4/+9
| | | | | | | | | | | | | | | | | ``` ==> memprof.after.txt <== Total allocated: 1.13 MB (2352 objects) Total retained: 10.08 kB (78 objects) ==> memprof.before.txt <== Total allocated: 46.27 MB (38439 objects) Total retained: 9.94 kB (75 objects) ``` Yes, we were allocating 45MB of arrays in `dependencies_installed?`, it was accidentally cubic. https://github.com/rubygems/rubygems/commit/13ab874388
* [rubygems/rubygems] Don't require 'json' unless it's actually neededEric Mueller2023-11-231-2/+1
| | | | https://github.com/rubygems/rubygems/commit/97ee203fd5
* [rubygems/rubygems] Add --json bundle-outdated flag to produce ↵Eric Mueller2023-11-232-4/+45
| | | | | | json-parseable output https://github.com/rubygems/rubygems/commit/65efa44bc0
* [rubygems/rubygems] Factor group-filtering to a private method to reduce ↵Eric Mueller2023-11-231-16/+16
| | | | | | | | | repetition We're about to expand the repeated bit of code, so drying it up a little is warranted. https://github.com/rubygems/rubygems/commit/e69c658be6
* [rubygems/rubygems] Fix universal lockfiles regressionDavid Rodriguez2023-11-223-4/+6
| | | | | | | | | | | | If a platform specific variant would not match the current Ruby, we would still be considering it compatible with the initial resolution and adding its platform to the lockfile, but we would later fail to materialize it for installation due to not really being compatible. Fix is to only add platforms for variants that are also compatible with current Ruby and RubyGems versions. https://github.com/rubygems/rubygems/commit/75d1290843
* [rubygems/rubygems] Fix invalid platform removal missing adjacent platformsBo Anderson2023-11-211-1/+1
| | | | https://github.com/rubygems/rubygems/commit/4ce66c41a2
* Always revert or skip extended require of RubyGems.Hiroshi SHIBATA2023-11-161-5/+2
|
* [rubygems/rubygems] User bundler UA when downloading gemsSamuel Giddins2023-11-157-23/+47
| | | | | | | | | | | | | | | Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA. Gem::RemoteFetcher is used to download gems, as well as the full index. We would like the bundler UA to be used whenever bundler is making requests. This PR also avoids unsafely mutating the headers hash on the shared `Gem::RemoteFetcher.fetcher` instance, which could cause corruption or incorrect headers when making parallel requests. Instead, we create one remote fetcher per rubygems remote, which is similar to the connection segregation bundler is already doing https://github.com/rubygems/rubygems/commit/f0e8dacdec
* [rubygems/rubygems] Make sure to `require "rubygems"` explicitlyNobuyoshi Nakada2023-11-131-0/+2
| | | | | | | This is also done in bundler/lib/bundler/rubygems_integration.rb, but bundler/lib/bundler.rb loads this file before it. https://github.com/rubygems/rubygems/commit/8840d8507b
* [rubygems/rubygems] Add a warning in an edge case of using `gemspec` DSLDavid Rodríguez2023-11-131-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | If a Gemfile duplicates a development dependency also defined in a local gemspec with a different requirement, the requirement in the local gemspec will be silently ignored. This surprised me. I think we should either: * Make sure both requirements are considered, like it happens for runtime dependencies (I added a spec to illustrate the current behavior here). * Add a warning that the requirement in the gemspec will be ignored. I think the former is slightly preferable, but it may cause some bundle's that previously resolve to no longer resolver. I went with the latter but the more I think about it, the more this seems like it should behave like the former. https://github.com/rubygems/rubygems/commit/ad6843972f
* [rubygems/rubygems] Remove now unnecessary dupDavid Rodríguez2023-11-131-1/+1
| | | | https://github.com/rubygems/rubygems/commit/3c1a6a7dfa
* [rubygems/rubygems] Add a note about `required_rubygems_version` in BundlerDavid Rodríguez2023-11-131-1/+3
| | | | https://github.com/rubygems/rubygems/commit/9509d98b5c
* [rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez2023-11-136-9/+9
| | | | https://github.com/rubygems/rubygems/commit/70243b1d72
* [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in BundlerDavid Rodríguez2023-11-135-26/+13
| | | | https://github.com/rubygems/rubygems/commit/93619c97ff
* [rubygems/rubygems] Automatically lock extra ruby platformsDavid Rodríguez2023-11-132-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | Since we started locking the specific platform in the lockfile, that has created an annoying situation for users that don't develop on Linux. They will create a lockfile on their machines, locking their local platform, for example, darwin. But then that lockfile won't work automatically when deploying to Heroku for example, because the lockfile is frozen and the Linux platform is not included. There's the chance though that resolving against two platforms (Linux + the local platform) won't succeed while resolving for just the current platform will. So, instead, we check other platform specific variants available for the resolution we initially found, and lock those platforms and specs too if they satisfy the resolution. This is only done when generating new lockfiles from scratch, existing lockfiles should keep working as before, and it's only done for "ruby platforms", i.e., not Java or Windows which have their own complexities, and so are excluded. With this change, we expect that MacOS users can bundle locally and deploy to Heroku without needing to do anything special. https://github.com/rubygems/rubygems/commit/5f24f06bc5
* [rubygems/rubygems] Extract builder to create a `LazySpecification` from ↵David Rodríguez2023-11-132-4/+9
| | | | | | full spec https://github.com/rubygems/rubygems/commit/957d3d9a7f
* [rubygems/rubygems] Extract a new small platform helperDavid Rodríguez2023-11-133-2/+7
| | | | https://github.com/rubygems/rubygems/commit/8f7340df8e
* [rubygems/rubygems] Remove unused `SpecSet#merge`David Rodríguez2023-11-131-10/+0
| | | | https://github.com/rubygems/rubygems/commit/53e0490b55
* [rubygems/rubygems] Pass source to `LazySpecification` initializerDavid Rodríguez2023-11-131-2/+1
| | | | https://github.com/rubygems/rubygems/commit/05120e2fe8
* [rubygems/rubygems] Allow setting metadata on LazySpecificationDavid Rodríguez2023-11-133-5/+5
| | | | | | | This is a step forward towards eventually including metadata in the lockfile. https://github.com/rubygems/rubygems/commit/56fc02b251
* [rubygems/rubygems] Set LazySpecification dependencies directlyDavid Rodríguez2023-11-132-3/+3
| | | | https://github.com/rubygems/rubygems/commit/2462c8e04d
* [rubygems/rubygems] Ensure we are using the same extension dirHan Young2023-11-081-1/+1
| | | | | | | | Since #6945 the extension dir changed to Gem::BasicSpecification's implementation, we didn't hook that in rubygems_ext.rb. So for universal rubies, we ended up using the universal platform name when installing, but arch replaced platform name when checking. This lead to native extensions can never be correctly installed on universal rubies. Hook Gem::BasicSpecifications so the behavior is consistent on installing and checking. https://github.com/rubygems/rubygems/commit/8d699ed096
* [rubygems/rubygems] Hack to get `Gem::Specification#extensions_dir` documentedDavid Rodríguez2023-11-081-3/+2
| | | | https://github.com/rubygems/rubygems/commit/625b8293f7
* [rubygems/rubygems] Simplify selecting specs with `force_ruby_platform` setDavid Rodríguez2023-11-083-3/+16
| | | | | | https://github.com/rubygems/rubygems/commit/5f90a43635 Co-authored-by: Martin Emde <martin.emde@gmail.com>
* [rubygems/rubygems] Better error when having an insecure install folderDavid Rodríguez2023-11-083-5/+31
| | | | https://github.com/rubygems/rubygems/commit/e41156e272
* [rubygems/rubygems] Remove redundant error classDavid Rodríguez2023-11-081-1/+1
| | | | | | It's a `BundlerError`. https://github.com/rubygems/rubygems/commit/53ea676dab
* [rubygems/rubygems] Fix regression on old git versionsDavid Rodríguez2023-11-081-1/+9
| | | | https://github.com/rubygems/rubygems/commit/abd91ca2e5
* [rubygems/rubygems] Don't show bug report template when GEM_HOME has no ↵David Rodríguez2023-11-081-0/+8
| | | | | | | | | | | | | | | | | | | | writable bit Instead, don't check that at all and proceed. If something fails to be written inside GEM_HOME, we'll eventually fail with a proper permissions error. In addition to that, the writable bit in GEM_HOME is not even reliable, because only the immediate parent is actually checked when writing. For example, ``` $ mkdir -p foo/bar $ chmod -w foo $ touch foo/bar/baz # writes without issue ``` https://github.com/rubygems/rubygems/commit/4bced7ac73
* [rubygems/rubygems] avoid dependency on setCody Cutrer2023-11-011-3/+1
| | | | | | | it was a performance improvement only, but it causes failures in unrelated tests https://github.com/rubygems/rubygems/commit/b4149cb9bf
* [rubygems/rubygems] Add Bundler::Plugin.loaded? helperCody Cutrer2023-11-011-2/+10
| | | | | | | Useful if your plugin introduces new methods to the DSL, so that Gemfiles can easily abort if the plugin hasn't loaded yet https://github.com/rubygems/rubygems/commit/b733055c6e
* [rubygems/rubygems] Only remove bundler plugin gem when it's inside the cacheCody Cutrer2023-10-312-1/+10
| | | | https://github.com/rubygems/rubygems/commit/8d51390ca4
* [rubygems/rubygems] Set file path when eval-ing local specification in ↵Samuel Giddins2023-10-251-1/+1
| | | | | | | | EndpointSpecification Not strictly necessary, but there is no reason not to be helpful and set the path https://github.com/rubygems/rubygems/commit/894c0303dd
* [rubygems/rubygems] Handle CI configuration on ignore list for ↵Hiroshi SHIBATA2023-10-252-1/+4
| | | | | | Gem::Specification#files https://github.com/rubygems/rubygems/commit/4bb0ef3e55
* [rubygems/rubygems] Handle empty arrayHiroshi SHIBATA2023-10-241-1/+6
| | | | https://github.com/rubygems/rubygems/commit/7c0afdd9af
* [rubygems/rubygems] Disabled Style/HashSyntax for keyword argumentsHiroshi SHIBATA2023-10-231-1/+1
| | | | https://github.com/rubygems/rubygems/commit/9b61b33568
* [rubygems/rubygems] Restore using old way of passing Ruby version to resolverDavid Rodríguez2023-10-232-2/+2
| | | | | | | | | | | | | | | | We used `Bundler::RubyVersion.system.gem_version` for a long time, but I changed this to `Gem.ruby_version` at https://github.com/rubygems/rubygems/commit/94f96439438e. It's unclear why I did that though since I believe it was unrelated to the fix in there. Bootboot patches `Bundler::RubyVersion` to customize how Bundler works with Ruby versions, and that change broke that. Since it's unclear to me how to achieve what Bootboot is doing with the current code, and there was no strong reason for the change, let's restore it for now. https://github.com/rubygems/rubygems/commit/8ec36c6017
* [rubygems/rubygems] Handle base64 encoded checksums in lockfile for future ↵Martin Emde2023-10-231-14/+19
| | | | | | | | compatibility. Save checksums using = as separator. https://github.com/rubygems/rubygems/commit/a36ad7d160
* [rubygems/rubygems] Improve errors and register checksums reliablyMartin Emde2023-10-2312-164/+264
| | | | | | | | | | | | Improve error reporting for checksums, raises a new error class. Solve for multi-source checksum errors. Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb https://github.com/rubygems/rubygems/commit/26ceee0e76 Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
* [rubygems/rubygems] rename Index#== to Index#subset?Martin Emde2023-10-232-4/+2
| | | | https://github.com/rubygems/rubygems/commit/a96a561087
* [rubygems/rubygems] Refactor Checksum classes and methods to reduceMartin Emde2023-10-238-270/+141
| | | | | | | code. (https://github.com/rubygems/rubygems/pull/6917) https://github.com/rubygems/rubygems/commit/2238bdaadc
* [rubygems/rubygems] Refactor to checksums stored via sourceSamuel Giddins2023-10-2314-142/+341
| | | | | | | | | | | | | | | | | | | | This gets the specs passing, and handles the fact that we expect checkums to be pinned only to a particular source This also avoids reading in .gem files during lockfile generation, instead allowing us to query the source for each resolved gem to grab the checksum Finally, this opens up a route to having user-stored checksum databases, similar to how other package managers do this! Add checksums to dev lockfiles Handle full name conflicts from different original_platforms when adding checksums to store from compact index Specs passing on Bundler 3 https://github.com/rubygems/rubygems/commit/86c7084e1c
* [rubygems/rubygems] Use the server checksum, then calculate from gem on disk ↵Mercedes Bernard2023-10-2310-80/+132
| | | | | | | | | | | | | | | | | | | | | | if possible 1. Use the checksum provided by the server if provided: provides security knowing if the gem you downloaded matches the gem on the server 2. Calculate the checksum from the gem on disk: provides security knowing if the gem has changed between installs 3. In some cases, neither is possible in which case we don't put anything in the checksum and we maintain functionality as it is today Add the checksums to specs in the index if we already have them Prior to checksums, we didn't lose any information when overwriting specs in the index with stubs. But now when we overwrite EndpointSpecifications or RemoteSpecifications with more generic specs, we could lose checksum info. This manually sets checksum info so we keep it in the index. https://github.com/rubygems/rubygems/commit/de00a4f153
* [rubygems/rubygems] Add CHECKSUMS for each gem in lockfileThong Kuah2023-10-236-1/+117
| | | | | | | | | | | | | We lock the checksum for each resolved spec under a new CHECKSUMS section in the lockfile. If the locked spec does not resolve for the local platform, we preserve the locked checksum, similar to how we preserve specs. Checksum locking only makes sense on install. The compact index information is only available then. https://github.com/rubygems/rubygems/commit/bde37ca6bf
* [rubygems/rubygems] Reuse Gem::RemoteFetcher instance in bundlerSamuel Giddins2023-10-191-2/+1
| | | | | | | | | | | | Closes https://github.com/rubygems/rubygems/issues/7076 Bundler will now use the same (shared) remote fetcher instance that RubyGems uses. This will allow installs to use a shared connection pool, which represents a significant performance improvement on a clean install. https://github.com/rubygems/rubygems/commit/cd87b40fe1
* [rubygems/rubygems] Update vendored thor to v1.3.0Samuel Giddins2023-10-1930-359/+823
| | | | | | See https://github.com/rails/thor/releases/tag/v1.3.0 https://github.com/rubygems/rubygems/commit/3c7165474b
* Don't need to refer SINCE constantHiroshi SHIBATA2023-10-191-1/+1
|