Skip to content

Commit e95bea3

Browse files
Merge pull request #4298 from rubygems/release/bundler_2.2.6_rubygems_3.2.6
Prepare bundler 2.2.6 & rubygems 3.2.6 releases
2 parents d13f722 + 17027d9 commit e95bea3

File tree

128 files changed

+1876
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1876
-70
lines changed

.changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ patch_level_labels:
2323
- "rubygems: security fix"
2424
- "rubygems: enhancement"
2525
- "rubygems: bug fix"
26+
- "rubygems: performance"
2627
- "rubygems: backport"
2728

2829
minor_level_labels:
2930
- "rubygems: deprecation"
3031
- "rubygems: feature"
31-
- "rubygems: performance"
3232
- "rubygems: documentation"

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 3.2.6 / 2021-01-18
2+
3+
## Enhancements:
4+
5+
* Fix `Gem::Platform#inspect` showing duplicate information. Pull request
6+
#4276 by deivid-rodriguez
7+
8+
## Bug fixes:
9+
10+
* Swallow any system call error in `ensure_gem_subdirs` to support jruby
11+
embedded paths. Pull request #4291 by kares
12+
* Restore accepting custom make command with extra options as the `make`
13+
env variable. Pull request #4271 by terceiro
14+
115
# 3.2.5 / 2021-01-11
216

317
## Bug fixes:

Rakefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ require 'psych'
77

88
desc "Setup Rubygems dev environment"
99
task :setup do
10-
sh "ruby bundler/bin/bundle install --gemfile=dev_gems.rb"
10+
sh "ruby", "bundler/bin/bundle", "install", "--gemfile=dev_gems.rb"
11+
end
12+
13+
desc "Update Rubygems dev environment"
14+
task :update do |_, args|
15+
sh "ruby", "bundler/bin/bundle", "update", *args, "--gemfile=dev_gems.rb"
1116
end
1217

1318
desc "Setup git hooks"

bundler/.changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ patch_level_labels:
2121
- "bundler: security fix"
2222
- "bundler: enhancement"
2323
- "bundler: bug fix"
24+
- "bundler: performance"
2425
- "bundler: backport"
2526

2627
minor_level_labels:
2728
- "bundler: deprecation"
2829
- "bundler: feature"
29-
- "bundler: performance"
3030
- "bundler: documentation"

bundler/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 2.2.6 (January 18, 2021)
2+
3+
## Enhancements:
4+
5+
- Improve resolver debugging [#4288](https://github.com/rubygems/rubygems/pull/4288)
6+
7+
## Bug fixes:
8+
9+
- Fix dependency locking for path source [#4293](https://github.com/rubygems/rubygems/pull/4293)
10+
11+
## Performance:
12+
13+
- Speed up complex dependency resolves by creating DepProxy factory and cache [#4216](https://github.com/rubygems/rubygems/pull/4216)
14+
115
# 2.2.5 (January 11, 2021)
216

317
## Enhancements:

bundler/Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ end
155155

156156
load "task/automatiek.rake"
157157

158+
# We currently ship Molinillo 0.7.0 with a patch on top to make use of `Array#-`
159+
# instead of `Array#&` on hot resolution code paths because it performs a lot
160+
# better.
158161
desc "Vendor a specific version of molinillo"
159162
Automatiek::RakeTask.new("molinillo") do |lib|
160163
lib.version = "0.7.0"

bundler/lib/bundler/definition.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -818,11 +818,6 @@ def converge_locked_specs
818818
# commonly happens if the version changed in the gemspec
819819
next unless new_spec
820820

821-
new_runtime_deps = new_spec.dependencies.select {|d| d.type != :development }
822-
old_runtime_deps = s.dependencies.select {|d| d.type != :development }
823-
# If the dependencies of the path source have changed and locked spec can't satisfy new dependencies, unlock it
824-
next unless new_runtime_deps.sort == old_runtime_deps.sort || new_runtime_deps.all? {|d| satisfies_locked_spec?(d) }
825-
826821
s.dependencies.replace(new_spec.dependencies)
827822
end
828823

@@ -897,7 +892,7 @@ def expand_dependencies(dependencies, remote = false)
897892

898893
def expand_dependency_with_platforms(dep, platforms)
899894
platforms.map do |p|
900-
DepProxy.new(dep, p)
895+
DepProxy.get_proxy(dep, p)
901896
end
902897
end
903898

@@ -977,7 +972,7 @@ def additional_base_requirements_for_resolve
977972
next requirements if @locked_gems.dependencies[name] != dependency
978973
next requirements if dependency.source.is_a?(Source::Path)
979974
dep = Gem::Dependency.new(name, ">= #{locked_spec.version}")
980-
requirements[name] = DepProxy.new(dep, locked_spec.platform)
975+
requirements[name] = DepProxy.get_proxy(dep, locked_spec.platform)
981976
requirements
982977
end.values
983978
end

bundler/lib/bundler/dep_proxy.rb

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ module Bundler
44
class DepProxy
55
attr_reader :__platform, :dep
66

7+
@proxies = {}
8+
9+
def self.get_proxy(dep, platform)
10+
@proxies[[dep, platform]] ||= new(dep, platform).freeze
11+
end
12+
713
def initialize(dep, platform)
814
@dep = dep
915
@__platform = platform
1016
end
1117

12-
def hash
13-
@hash ||= [dep, __platform].hash
14-
end
15-
16-
def ==(other)
17-
return false if other.class != self.class
18-
dep == other.dep && __platform == other.__platform
19-
end
18+
private_class_method :new
2019

2120
alias_method :eql?, :==
2221

@@ -39,6 +38,14 @@ def to_s
3938
s
4039
end
4140

41+
def dup
42+
raise NoMethodError.new("DepProxy cannot be duplicated")
43+
end
44+
45+
def clone
46+
raise NoMethodError.new("DepProxy cannot be cloned")
47+
end
48+
4249
private
4350

4451
def method_missing(*args, &blk)

bundler/lib/bundler/gem_version_promoter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def sort_versions(dep, spec_groups)
8181
sort_dep_specs(spec_groups, locked_spec)
8282
end.tap do |specs|
8383
if DEBUG
84-
warn before_result
85-
warn " after sort_versions: #{debug_format_result(dep, specs).inspect}"
84+
puts before_result
85+
puts " after sort_versions: #{debug_format_result(dep, specs).inspect}"
8686
end
8787
end
8888
end

bundler/lib/bundler/resolver.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def initialize(index, source_requirements, base, gem_version_promoter, additiona
3232
@base_dg = Molinillo::DependencyGraph.new
3333
@base.each do |ls|
3434
dep = Dependency.new(ls.name, ls.version)
35-
@base_dg.add_vertex(ls.name, DepProxy.new(dep, ls.platform), true)
35+
@base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
3636
end
3737
additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
3838
@platforms = platforms
@@ -75,7 +75,7 @@ def debug(depth = 0)
7575
return unless debug?
7676
debug_info = yield
7777
debug_info = debug_info.inspect unless debug_info.is_a?(String)
78-
puts debug_info.split("\n").map {|s| "BUNDLER: " + " " * depth + s }
78+
puts debug_info.split("\n").map {|s| depth == 0 ? "BUNDLER: #{s}" : "BUNDLER(#{depth}): #{s}" }
7979
end
8080

8181
def debug?

0 commit comments

Comments
 (0)