Skip to content

Commit 385dc5d

Browse files
deivid-rodriguezhsbt
authored andcommitted
[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) ruby/rubygems@201c1863fc
1 parent a1716e2 commit 385dc5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/bundler/match_metadata.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def matches_current_rubygems?
1616

1717
def expanded_dependencies
1818
runtime_dependencies + [
19-
metadata_dependency("Ruby", required_ruby_version),
20-
metadata_dependency("RubyGems", required_rubygems_version),
19+
metadata_dependency("Ruby", @required_ruby_version),
20+
metadata_dependency("RubyGems", @required_rubygems_version),
2121
].compact
2222
end
2323

0 commit comments

Comments
 (0)