diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2025-01-31 09:19:49 +0100 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-02-06 15:57:57 +0900 |
| commit | 385dc5dc168504b38f59036d17aa4e012b72f1e8 (patch) | |
| tree | 41bade3f45d0f96b6c3b810e9039eb9d79d94790 | |
| parent | a1716e236566fd34e4f17b9b484cc077f48e7e69 (diff) | |
[rubygems/rubygems] Don't potentially load remote metadata when expanding dependencies
For installed specifications, we can ignore any constraints they may
have, since we know they match the current version of Ruby or otherwise
would not be installed.
For remote specifications, we already resolve optimistically without
metadata and retry force-fetching it if necessary.
If in the future we support resolving against a Ruby version different
that the one being run, we'll probably need to change this but now it's
unnecessary and saves some memory.
### Before
Total allocated: 262.99 MB (3177437 objects)
Total retained: 115.91 MB (1297821 objects)
### After
Total allocated: 259.89 MB (3134199 objects)
Total retained: 115.05 MB (1283779 objects)
https://github.com/rubygems/rubygems/commit/201c1863fc
| -rw-r--r-- | lib/bundler/match_metadata.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/match_metadata.rb b/lib/bundler/match_metadata.rb index 25d82b0983..6fd2994a85 100644 --- a/lib/bundler/match_metadata.rb +++ b/lib/bundler/match_metadata.rb @@ -16,8 +16,8 @@ module Bundler def expanded_dependencies runtime_dependencies + [ - metadata_dependency("Ruby", required_ruby_version), - metadata_dependency("RubyGems", required_rubygems_version), + metadata_dependency("Ruby", @required_ruby_version), + metadata_dependency("RubyGems", @required_rubygems_version), ].compact end |
