summaryrefslogtreecommitdiff
path: root/lib/bundler
AgeCommit message (Collapse)Author
2023-12-05[rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno
Bundler::CompactIndexClient::Cache#versions String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/4e864a8f2e
2023-12-05[rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno
Bundler::YAMLSerializer#load String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/5b324969cd
2023-12-01[rubygems/rubygems] Reduce array allocations when loading definitionSamuel Giddins
The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once https://github.com/rubygems/rubygems/commit/009a3c6d0d
2023-12-01[rubygems/rubygems] Many major_deprecations supply :removed_messageEric Mueller
Generally the removed message is very similar, but often it needs to specify that the feature has "been removed" instead of "will be removed", or "been deprecated". And a few chunks of text needed more substantial updates. And a number of them seemed to have been carefully crafted to make sense in either context, so I left those alone. https://github.com/rubygems/rubygems/commit/8d42cf9104
2023-12-01[rubygems/rubygems] major_deprecation accepts :removed_messageEric Mueller
If supplied, it uses that in place of the message for the case where the deprecation version is already past. https://github.com/rubygems/rubygems/commit/1deb73663c
2023-11-30[rubygems/rubygems] Allow auto-install to install missing git gemsSamuel Giddins
Currently, auto-install with git gems fails, when it would succeed with a rubygems-source gem Fix the issue by doing the same fallback for git errors as we do for missing gems, the git errors should only bubble up in these cases when the gem is not installed, meaning we want to go through the install flow (and any persistent errors will be raised through there) https://github.com/rubygems/rubygems/commit/e25a339f7a
2023-11-29[rubygems/rubygems] Avoid re-compiling static regexp in a loopSamuel Giddins
Pathname::SEPARATOR_PAT is a constant and can safely be interpolated once, avoiding creating a new regexp object on every iteration https://github.com/rubygems/rubygems/commit/75d9c0f1e4
2023-11-29[rubygems/rubygems] update Magnus library in Rust extension gem templateMichael Go
https://github.com/rubygems/rubygems/commit/46f09800da
2023-11-27Opaque Etags for compact index requestsJosef Šimánek
This changes the CompactIndexClient to store etags received from the compact index in separate files rather than relying on the MD5 checksum of the file as the etag. Smoothes the upgrade from md5 etags to opaque by generating them when no etag file exists. This should reduce the initial impact of changing the caching behavior by reducing cache misses when the MD5 etag is the same. Eventually, the MD5 behavior should be retired and the etag should be considered completely opaque with no assumption that MD5 would match.
2023-11-27[rubygems/rubygems] Don't remember `--jobs` flagDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9ab1136036
2023-11-27[rubygems/rubygems] Fix advice in `bundle install --system` deprecationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/59a66e3560
2023-11-27[rubygems/rubygems] Keep a single copy of the remembered flag deprecation ↵David Rodríguez
message https://github.com/rubygems/rubygems/commit/cb4e26eabc
2023-11-27[rubygems/rubygems] Avoid some unnecessary quotes in remember flag ↵David Rodríguez
deprecation message https://github.com/rubygems/rubygems/commit/3fd627e486
2023-11-27[rubygems/rubygems] Simplify remembered flags deprecation messageDavid Rodríguez
Configuration is now local by default. https://github.com/rubygems/rubygems/commit/6bc7709aa8
2023-11-26[rubygems/rubygems] Add missing --prefer-local to Synopsis in ↵Olle Jonsson
bundle-install.1.ronn https://github.com/rubygems/rubygems/commit/e956c5bbe4
2023-11-26[rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins
``` ==> 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
2023-11-23[rubygems/rubygems] Don't require 'json' unless it's actually neededEric Mueller
https://github.com/rubygems/rubygems/commit/97ee203fd5
2023-11-23[rubygems/rubygems] Add --json bundle-outdated flag to produce ↵Eric Mueller
json-parseable output https://github.com/rubygems/rubygems/commit/65efa44bc0
2023-11-23[rubygems/rubygems] Factor group-filtering to a private method to reduce ↵Eric Mueller
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
2023-11-22[rubygems/rubygems] Fix universal lockfiles regressionDavid Rodriguez
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
2023-11-21[rubygems/rubygems] Fix invalid platform removal missing adjacent platformsBo Anderson
https://github.com/rubygems/rubygems/commit/4ce66c41a2
2023-11-16Always revert or skip extended require of RubyGems.Hiroshi SHIBATA
2023-11-15[rubygems/rubygems] User bundler UA when downloading gemsSamuel Giddins
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
2023-11-13[rubygems/rubygems] Make sure to `require "rubygems"` explicitlyNobuyoshi Nakada
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
2023-11-13[rubygems/rubygems] Add a warning in an edge case of using `gemspec` DSLDavid Rodríguez
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
2023-11-13[rubygems/rubygems] Remove now unnecessary dupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3c1a6a7dfa
2023-11-13[rubygems/rubygems] Add a note about `required_rubygems_version` in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9509d98b5c
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-11-13[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/93619c97ff
2023-11-13[rubygems/rubygems] Automatically lock extra ruby platformsDavid Rodríguez
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
2023-11-13[rubygems/rubygems] Extract builder to create a `LazySpecification` from ↵David Rodríguez
full spec https://github.com/rubygems/rubygems/commit/957d3d9a7f
2023-11-13[rubygems/rubygems] Extract a new small platform helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8f7340df8e
2023-11-13[rubygems/rubygems] Remove unused `SpecSet#merge`David Rodríguez
https://github.com/rubygems/rubygems/commit/53e0490b55
2023-11-13[rubygems/rubygems] Pass source to `LazySpecification` initializerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/05120e2fe8
2023-11-13[rubygems/rubygems] Allow setting metadata on LazySpecificationDavid Rodríguez
This is a step forward towards eventually including metadata in the lockfile. https://github.com/rubygems/rubygems/commit/56fc02b251
2023-11-13[rubygems/rubygems] Set LazySpecification dependencies directlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/2462c8e04d
2023-11-08[rubygems/rubygems] Ensure we are using the same extension dirHan Young
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
2023-11-08[rubygems/rubygems] Hack to get `Gem::Specification#extensions_dir` documentedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/625b8293f7
2023-11-08[rubygems/rubygems] Simplify selecting specs with `force_ruby_platform` setDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5f90a43635 Co-authored-by: Martin Emde <martin.emde@gmail.com>
2023-11-08[rubygems/rubygems] Better error when having an insecure install folderDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e41156e272
2023-11-08[rubygems/rubygems] Remove redundant error classDavid Rodríguez
It's a `BundlerError`. https://github.com/rubygems/rubygems/commit/53ea676dab
2023-11-08[rubygems/rubygems] Fix regression on old git versionsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/abd91ca2e5
2023-11-08[rubygems/rubygems] Don't show bug report template when GEM_HOME has no ↵David Rodríguez
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
2023-11-01[rubygems/rubygems] avoid dependency on setCody Cutrer
it was a performance improvement only, but it causes failures in unrelated tests https://github.com/rubygems/rubygems/commit/b4149cb9bf
2023-11-01[rubygems/rubygems] Add Bundler::Plugin.loaded? helperCody Cutrer
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
2023-10-31[rubygems/rubygems] Only remove bundler plugin gem when it's inside the cacheCody Cutrer
https://github.com/rubygems/rubygems/commit/8d51390ca4
2023-10-25[rubygems/rubygems] Set file path when eval-ing local specification in ↵Samuel Giddins
EndpointSpecification Not strictly necessary, but there is no reason not to be helpful and set the path https://github.com/rubygems/rubygems/commit/894c0303dd
2023-10-25[rubygems/rubygems] Handle CI configuration on ignore list for ↵Hiroshi SHIBATA
Gem::Specification#files https://github.com/rubygems/rubygems/commit/4bb0ef3e55
2023-10-24[rubygems/rubygems] Handle empty arrayHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/7c0afdd9af
2023-10-23[rubygems/rubygems] Disabled Style/HashSyntax for keyword argumentsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/9b61b33568