rubygems-update 3.3.11 → 3.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/bundler/CHANGELOG.md +8 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/current_ruby.rb +1 -0
- data/bundler/lib/bundler/definition.rb +1 -18
- data/bundler/lib/bundler/dependency.rb +18 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +2 -2
- data/bundler/lib/bundler/resolver.rb +60 -27
- data/bundler/lib/bundler/ruby_version.rb +0 -13
- data/bundler/lib/bundler/rubygems_ext.rb +17 -0
- data/bundler/lib/bundler/source/metadata.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +1 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +32 -26
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/bundler/lib/bundler/vendor/tsort/lib/tsort.rb +318 -319
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/installer.rb +0 -2
- data/lib/rubygems/optparse/lib/optparse/ac.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse/date.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse/kwargs.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse/shellwords.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse/time.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse/uri.rb +1 -1
- data/lib/rubygems/optparse/lib/optparse.rb +75 -2
- data/lib/rubygems/specification.rb +10 -0
- data/lib/rubygems.rb +6 -8
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/helper.rb +1 -6
- data/test/rubygems/test_gem.rb +6 -14
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +2 -2
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +2 -2
- data/test/rubygems/test_gem_ext_cargo_builder.rb +1 -3
- data/test/rubygems/test_gem_installer.rb +3 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9314857143aa2b095c0028db4bbc09949f82782bd34c0d893d65deb6931945af
|
4
|
+
data.tar.gz: a2d4832c42b5fa2849ff2d912c1b88fdbe7d0181fdddb8cf901e30c1f7930d33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e1db6cb3a120848b7888a4f1b93289386e16354028c72edae9b3db54024a80cc53b469112ee2e9fba2aeb9bdb741e3f67d5a146eeec096b916d3f189d9fdd16
|
7
|
+
data.tar.gz: 9c295eacaa13320c41af660ef26d81440d07af5ceeef8a0e4ed426b6af9029a4f59897424d5e81519c6097384aa88afd4bf35cf4669784d27a1452a138da278c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# 3.3.12 / 2022-04-20
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Less error swallowing when installing gems. Pull request #5475 by
|
6
|
+
deivid-rodriguez
|
7
|
+
* Stop considering `RUBY_PATCHLEVEL` for resolution. Pull request #5472 by
|
8
|
+
deivid-rodriguez
|
9
|
+
* Bump vendored optparse to latest master. Pull request #5466 by
|
10
|
+
deivid-rodriguez
|
11
|
+
* Installs bundler 2.3.12 as a default gem.
|
12
|
+
|
13
|
+
## Documentation:
|
14
|
+
|
15
|
+
* Fix formatting in docs. Pull request #5470 by peterzhu2118
|
16
|
+
* Fix a typo. Pull request #5401 by znz
|
17
|
+
|
1
18
|
# 3.3.11 / 2022-04-07
|
2
19
|
|
3
20
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 2.3.12 (April 20, 2022)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Improve Ruby version resolution conflicts [#5474](https://github.com/rubygems/rubygems/pull/5474)
|
6
|
+
- Stop considering `RUBY_PATCHLEVEL` for resolution [#5472](https://github.com/rubygems/rubygems/pull/5472)
|
7
|
+
- Add modern rubies as valid platform values in Gemfile DSL [#5469](https://github.com/rubygems/rubygems/pull/5469)
|
8
|
+
|
1
9
|
# 2.3.11 (April 7, 2022)
|
2
10
|
|
3
11
|
## Enhancements:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2022-04-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2022-04-20".freeze
|
8
|
+
@git_commit_sha = "75031e03f4".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -732,30 +732,13 @@ module Bundler
|
|
732
732
|
|
733
733
|
def metadata_dependencies
|
734
734
|
@metadata_dependencies ||= begin
|
735
|
-
ruby_versions = ruby_version_requirements(@ruby_version)
|
736
735
|
[
|
737
|
-
Dependency.new("Ruby\0",
|
736
|
+
Dependency.new("Ruby\0", RubyVersion.system.gem_version),
|
738
737
|
Dependency.new("RubyGems\0", Gem::VERSION),
|
739
738
|
]
|
740
739
|
end
|
741
740
|
end
|
742
741
|
|
743
|
-
def ruby_version_requirements(ruby_version)
|
744
|
-
return [] unless ruby_version
|
745
|
-
if ruby_version.patchlevel
|
746
|
-
[ruby_version.to_gem_version_with_patchlevel]
|
747
|
-
else
|
748
|
-
ruby_version.versions.map do |version|
|
749
|
-
requirement = Gem::Requirement.new(version)
|
750
|
-
if requirement.exact?
|
751
|
-
"~> #{version}.0"
|
752
|
-
else
|
753
|
-
requirement
|
754
|
-
end
|
755
|
-
end
|
756
|
-
end
|
757
|
-
end
|
758
|
-
|
759
742
|
def expand_dependencies(dependencies, remote = false)
|
760
743
|
deps = []
|
761
744
|
dependencies.each do |dep|
|
@@ -20,6 +20,9 @@ module Bundler
|
|
20
20
|
:ruby_24 => Gem::Platform::RUBY,
|
21
21
|
:ruby_25 => Gem::Platform::RUBY,
|
22
22
|
:ruby_26 => Gem::Platform::RUBY,
|
23
|
+
:ruby_27 => Gem::Platform::RUBY,
|
24
|
+
:ruby_30 => Gem::Platform::RUBY,
|
25
|
+
:ruby_31 => Gem::Platform::RUBY,
|
23
26
|
:mri => Gem::Platform::RUBY,
|
24
27
|
:mri_18 => Gem::Platform::RUBY,
|
25
28
|
:mri_19 => Gem::Platform::RUBY,
|
@@ -30,6 +33,9 @@ module Bundler
|
|
30
33
|
:mri_24 => Gem::Platform::RUBY,
|
31
34
|
:mri_25 => Gem::Platform::RUBY,
|
32
35
|
:mri_26 => Gem::Platform::RUBY,
|
36
|
+
:mri_27 => Gem::Platform::RUBY,
|
37
|
+
:mri_30 => Gem::Platform::RUBY,
|
38
|
+
:mri_31 => Gem::Platform::RUBY,
|
33
39
|
:rbx => Gem::Platform::RUBY,
|
34
40
|
:truffleruby => Gem::Platform::RUBY,
|
35
41
|
:jruby => Gem::Platform::JAVA,
|
@@ -45,6 +51,9 @@ module Bundler
|
|
45
51
|
:mswin_24 => Gem::Platform::MSWIN,
|
46
52
|
:mswin_25 => Gem::Platform::MSWIN,
|
47
53
|
:mswin_26 => Gem::Platform::MSWIN,
|
54
|
+
:mswin_27 => Gem::Platform::MSWIN,
|
55
|
+
:mswin_30 => Gem::Platform::MSWIN,
|
56
|
+
:mswin_31 => Gem::Platform::MSWIN,
|
48
57
|
:mswin64 => Gem::Platform::MSWIN64,
|
49
58
|
:mswin64_19 => Gem::Platform::MSWIN64,
|
50
59
|
:mswin64_20 => Gem::Platform::MSWIN64,
|
@@ -54,6 +63,9 @@ module Bundler
|
|
54
63
|
:mswin64_24 => Gem::Platform::MSWIN64,
|
55
64
|
:mswin64_25 => Gem::Platform::MSWIN64,
|
56
65
|
:mswin64_26 => Gem::Platform::MSWIN64,
|
66
|
+
:mswin64_27 => Gem::Platform::MSWIN64,
|
67
|
+
:mswin64_30 => Gem::Platform::MSWIN64,
|
68
|
+
:mswin64_31 => Gem::Platform::MSWIN64,
|
57
69
|
:mingw => Gem::Platform::MINGW,
|
58
70
|
:mingw_18 => Gem::Platform::MINGW,
|
59
71
|
:mingw_19 => Gem::Platform::MINGW,
|
@@ -64,6 +76,9 @@ module Bundler
|
|
64
76
|
:mingw_24 => Gem::Platform::MINGW,
|
65
77
|
:mingw_25 => Gem::Platform::MINGW,
|
66
78
|
:mingw_26 => Gem::Platform::MINGW,
|
79
|
+
:mingw_27 => Gem::Platform::MINGW,
|
80
|
+
:mingw_30 => Gem::Platform::MINGW,
|
81
|
+
:mingw_31 => Gem::Platform::MINGW,
|
67
82
|
:x64_mingw => Gem::Platform::X64_MINGW,
|
68
83
|
:x64_mingw_20 => Gem::Platform::X64_MINGW,
|
69
84
|
:x64_mingw_21 => Gem::Platform::X64_MINGW,
|
@@ -72,6 +87,9 @@ module Bundler
|
|
72
87
|
:x64_mingw_24 => Gem::Platform::X64_MINGW,
|
73
88
|
:x64_mingw_25 => Gem::Platform::X64_MINGW,
|
74
89
|
:x64_mingw_26 => Gem::Platform::X64_MINGW,
|
90
|
+
:x64_mingw_27 => Gem::Platform::X64_MINGW,
|
91
|
+
:x64_mingw_30 => Gem::Platform::X64_MINGW,
|
92
|
+
:x64_mingw_31 => Gem::Platform::X64_MINGW,
|
75
93
|
}.freeze
|
76
94
|
|
77
95
|
def initialize(name, version, options = {}, &blk)
|
@@ -97,10 +97,10 @@ module Bundler
|
|
97
97
|
spec = @specs[platform].first
|
98
98
|
return [] if spec.is_a?(LazySpecification)
|
99
99
|
dependencies = []
|
100
|
-
|
100
|
+
unless spec.required_ruby_version.none?
|
101
101
|
dependencies << DepProxy.get_proxy(Gem::Dependency.new("Ruby\0", spec.required_ruby_version), platform)
|
102
102
|
end
|
103
|
-
|
103
|
+
unless spec.required_rubygems_version.none?
|
104
104
|
dependencies << DepProxy.get_proxy(Gem::Dependency.new("RubyGems\0", spec.required_rubygems_version), platform)
|
105
105
|
end
|
106
106
|
dependencies
|
@@ -312,29 +312,66 @@ module Bundler
|
|
312
312
|
|
313
313
|
e = Molinillo::VersionConflict.new(conflicts, e.specification_provider) unless conflicts.empty?
|
314
314
|
|
315
|
-
solver_name = "Bundler"
|
316
|
-
possibility_type = "gem"
|
317
315
|
e.message_with_trees(
|
318
|
-
:
|
319
|
-
|
320
|
-
|
316
|
+
:full_message_for_conflict => lambda do |name, conflict|
|
317
|
+
o = if name.end_with?("\0")
|
318
|
+
String.new("Bundler found conflicting requirements for the #{name} version:")
|
319
|
+
else
|
320
|
+
String.new("Bundler could not find compatible versions for gem \"#{name}\":")
|
321
|
+
end
|
322
|
+
o << %(\n)
|
323
|
+
if conflict.locked_requirement
|
324
|
+
o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
|
325
|
+
o << %( #{SharedHelpers.pretty_dependency(conflict.locked_requirement)}\n)
|
326
|
+
o << %(\n)
|
327
|
+
end
|
328
|
+
o << %( In #{name_for_explicit_dependency_source}:\n)
|
329
|
+
trees = conflict.requirement_trees
|
330
|
+
|
321
331
|
# called first, because we want to reduce the amount of work required to find maximal empty sets
|
322
332
|
trees = trees.uniq {|t| t.flatten.map {|dep| [dep.name, dep.requirement] } }
|
323
333
|
|
324
334
|
# bail out if tree size is too big for Array#combination to make any sense
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
335
|
+
if trees.size <= 15
|
336
|
+
maximal = 1.upto(trees.size).map do |size|
|
337
|
+
trees.map(&:last).flatten(1).combination(size).to_a
|
338
|
+
end.flatten(1).select do |deps|
|
339
|
+
Bundler::VersionRanges.empty?(*Bundler::VersionRanges.for_many(deps.map(&:requirement)))
|
340
|
+
end.min_by(&:size)
|
341
|
+
|
342
|
+
trees.reject! {|t| !maximal.include?(t.last) } if maximal
|
343
|
+
|
344
|
+
trees.sort_by! {|t| t.reverse.map(&:name) }
|
345
|
+
end
|
346
|
+
|
347
|
+
metadata_requirements = {}
|
348
|
+
|
349
|
+
o << trees.map do |tree|
|
350
|
+
t = "".dup
|
351
|
+
depth = 2
|
352
|
+
|
353
|
+
base_tree = tree.first
|
354
|
+
base_tree_name = base_tree.name
|
355
|
+
|
356
|
+
if base_tree_name.end_with?("\0")
|
357
|
+
metadata_requirements[base_tree_name] = base_tree
|
358
|
+
t = nil
|
359
|
+
else
|
360
|
+
tree.each do |req|
|
361
|
+
t << " " * depth << SharedHelpers.pretty_dependency(req)
|
362
|
+
unless tree.last == req
|
363
|
+
if spec = conflict.activated_by_name[req.name]
|
364
|
+
t << %( was resolved to #{spec.version}, which)
|
365
|
+
end
|
366
|
+
t << %( depends on)
|
367
|
+
end
|
368
|
+
t << %(\n)
|
369
|
+
depth += 1
|
370
|
+
end
|
371
|
+
end
|
372
|
+
t
|
373
|
+
end.compact.join("\n")
|
374
|
+
|
338
375
|
if name == "bundler"
|
339
376
|
o << %(\n Current Bundler version:\n bundler (#{Bundler::VERSION}))
|
340
377
|
|
@@ -355,11 +392,13 @@ module Bundler
|
|
355
392
|
o << "Your bundle requires a different version of Bundler than the one you're running, and that version could not be found.\n"
|
356
393
|
end
|
357
394
|
end
|
395
|
+
elsif name.end_with?("\0")
|
396
|
+
o << %(\n Current #{name} version:\n #{SharedHelpers.pretty_dependency(metadata_requirements[name])}\n\n)
|
358
397
|
elsif conflict.locked_requirement
|
359
398
|
o << "\n"
|
360
399
|
o << %(Running `bundle update` will rebuild your snapshot from scratch, using only\n)
|
361
400
|
o << %(the gems in your Gemfile, which may resolve the conflict.\n)
|
362
|
-
elsif !conflict.existing
|
401
|
+
elsif !conflict.existing
|
363
402
|
o << "\n"
|
364
403
|
|
365
404
|
relevant_source = conflict.requirement.source || source_for(name)
|
@@ -372,14 +411,8 @@ module Bundler
|
|
372
411
|
|
373
412
|
o << gem_not_found_message(name, conflict.requirement, relevant_source, extra_message)
|
374
413
|
end
|
375
|
-
|
376
|
-
|
377
|
-
:incompatible_version_message_for_conflict => lambda do |name, _conflict|
|
378
|
-
if name.end_with?("\0")
|
379
|
-
%(#{solver_name} found conflicting requirements for the #{name} version:)
|
380
|
-
else
|
381
|
-
%(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
|
382
|
-
end
|
414
|
+
|
415
|
+
o
|
383
416
|
end
|
384
417
|
)
|
385
418
|
end
|
@@ -110,19 +110,6 @@ module Bundler
|
|
110
110
|
@ruby_version ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)
|
111
111
|
end
|
112
112
|
|
113
|
-
def to_gem_version_with_patchlevel
|
114
|
-
@gem_version_with_patch ||= begin
|
115
|
-
Gem::Version.create("#{@gem_version}.#{@patchlevel}")
|
116
|
-
rescue ArgumentError
|
117
|
-
@gem_version
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
def exact?
|
122
|
-
return @exact if defined?(@exact)
|
123
|
-
@exact = versions.all? {|v| Gem::Requirement.create(v).exact? }
|
124
|
-
end
|
125
|
-
|
126
113
|
private
|
127
114
|
|
128
115
|
def matches?(requirements, version)
|
@@ -67,6 +67,23 @@ module Gem
|
|
67
67
|
full_gem_path
|
68
68
|
end
|
69
69
|
|
70
|
+
unless const_defined?(:LATEST_RUBY_WITHOUT_PATCH_VERSIONS)
|
71
|
+
LATEST_RUBY_WITHOUT_PATCH_VERSIONS = Gem::Version.new("2.1")
|
72
|
+
|
73
|
+
alias_method :rg_required_ruby_version=, :required_ruby_version=
|
74
|
+
def required_ruby_version=(req)
|
75
|
+
self.rg_required_ruby_version = req
|
76
|
+
|
77
|
+
@required_ruby_version.requirements.map! do |op, v|
|
78
|
+
if v >= LATEST_RUBY_WITHOUT_PATCH_VERSIONS && v.release.segments.size == 4
|
79
|
+
[op == "~>" ? "=" : op, Gem::Version.new(v.segments.tap {|s| s.delete_at(3) }.join("."))]
|
80
|
+
else
|
81
|
+
[op, v]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
70
87
|
def groups
|
71
88
|
@groups ||= []
|
72
89
|
end
|
@@ -5,7 +5,7 @@ module Bundler
|
|
5
5
|
class Metadata < Source
|
6
6
|
def specs
|
7
7
|
@specs ||= Index.build do |idx|
|
8
|
-
idx << Gem::Specification.new("Ruby\0", RubyVersion.system.
|
8
|
+
idx << Gem::Specification.new("Ruby\0", RubyVersion.system.gem_version)
|
9
9
|
idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.default
|
11
11
|
end
|
@@ -32,7 +32,7 @@ module Bundler::Molinillo
|
|
32
32
|
# all belong to the same graph.
|
33
33
|
# @return [Array<Vertex>] The sorted vertices.
|
34
34
|
def self.tsort(vertices)
|
35
|
-
TSort.tsort(
|
35
|
+
Bundler::TSort.tsort(
|
36
36
|
lambda { |b| vertices.each(&b) },
|
37
37
|
lambda { |v, &b| (v.successors & vertices).each(&b) }
|
38
38
|
)
|
@@ -107,36 +107,42 @@ module Bundler::Molinillo
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
110
|
+
full_message_for_conflict = opts.delete(:full_message_for_conflict) do
|
111
|
+
proc do |name, conflict|
|
112
|
+
o = "\n".dup << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
|
113
|
+
if conflict.locked_requirement
|
114
|
+
o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
|
115
|
+
o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
|
116
|
+
o << %(\n)
|
117
|
+
end
|
118
|
+
o << %( In #{name_for_explicit_dependency_source}:\n)
|
119
|
+
trees = reduce_trees.call(conflict.requirement_trees)
|
120
|
+
|
121
|
+
o << trees.map do |tree|
|
122
|
+
t = ''.dup
|
123
|
+
depth = 2
|
124
|
+
tree.each do |req|
|
125
|
+
t << ' ' * depth << printable_requirement.call(req)
|
126
|
+
unless tree.last == req
|
127
|
+
if spec = conflict.activated_by_name[name_for(req)]
|
128
|
+
t << %( was resolved to #{version_for_spec.call(spec)}, which)
|
129
|
+
end
|
130
|
+
t << %( depends on)
|
128
131
|
end
|
129
|
-
t << %(
|
132
|
+
t << %(\n)
|
133
|
+
depth += 1
|
130
134
|
end
|
131
|
-
t
|
132
|
-
|
133
|
-
end
|
134
|
-
t
|
135
|
-
end.join("\n")
|
135
|
+
t
|
136
|
+
end.join("\n")
|
136
137
|
|
137
|
-
|
138
|
+
additional_message_for_conflict.call(o, name, conflict)
|
138
139
|
|
139
|
-
|
140
|
+
o
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
|
145
|
+
o << full_message_for_conflict.call(name, conflict)
|
140
146
|
end.strip
|
141
147
|
end
|
142
148
|
end
|