bundler 2.3.12 → 2.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489c8d7661dcb4d99b7990a44d02dc883d10e31adb0297fa09f52ff502424e63
4
- data.tar.gz: d050d525313844234ca93b7c879f7582ff2d0e0a334f33b706bc67039e8511b5
3
+ metadata.gz: bcf48063fd68ff2303185f1bb117dcb52395cfdbc622d9a41dfc658115b196eb
4
+ data.tar.gz: 28a397130a9eb30ec877e7563cecccf29e8a1d849096028a6c49eb7ddd48ebd6
5
5
  SHA512:
6
- metadata.gz: 853c3263abfbf6296e2256a5ea8df6860fe71591b25d3c5087839c9c0a0e5b7787b5696e621becb4c825f1429bc6fb1c07ca9b6b87f508910415ff23d2c05015
7
- data.tar.gz: e4fe33afda4a3c4ab8ea8b3e6ba458fc335cc76443d1062a674be0093fb87b25dd37c310e53d0c00dca3417c2e20c89c5f4e72b03000e897d4136758ccc2e210
6
+ metadata.gz: 8e1ef096a5444ba67c2b3d89ad91f6e26df973c18793c41b96ff2797ca15be596df5e6bd0c78a9e17d9078d30f5e348bcc17cde5d76bb1ce2534f3247716538f
7
+ data.tar.gz: 2ab4b43b9863888cb4515a5305b1fcbcb5eb4fa5e4f9aaa27c8202ad0de0a210dbf3304318728514436513060e950a8bfbad0c849f6ae73ac61eac120b36d644
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 2.3.13 (May 4, 2022)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix missing required rubygems version when using old APIs [#5496](https://github.com/rubygems/rubygems/pull/5496)
6
+ - Fix crash when gem used twice in Gemfile under different platforms [#5187](https://github.com/rubygems/rubygems/pull/5187)
7
+
8
+ ## Performance:
9
+
10
+ - Speed up `bundler/setup` time [#5503](https://github.com/rubygems/rubygems/pull/5503)
11
+
1
12
  # 2.3.12 (April 20, 2022)
2
13
 
3
14
  ## 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-20".freeze
8
- @git_commit_sha = "75031e03f4".freeze
7
+ @built_at = "2022-05-04".freeze
8
+ @git_commit_sha = "b20be5a433".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -87,10 +87,11 @@ module Bundler
87
87
  @platforms = @locked_platforms.dup
88
88
  @locked_bundler_version = @locked_gems.bundler_version
89
89
  @locked_ruby_version = @locked_gems.ruby_version
90
+ @originally_locked_specs = SpecSet.new(@locked_gems.specs)
90
91
 
91
92
  if unlock != true
92
93
  @locked_deps = @locked_gems.dependencies
93
- @locked_specs = SpecSet.new(@locked_gems.specs)
94
+ @locked_specs = @originally_locked_specs
94
95
  @locked_sources = @locked_gems.sources
95
96
  else
96
97
  @unlock = {}
@@ -255,14 +256,14 @@ module Bundler
255
256
  # @return [SpecSet] resolved dependencies
256
257
  def resolve
257
258
  @resolve ||= begin
258
- last_resolve = converge_locked_specs
259
259
  if Bundler.frozen_bundle?
260
260
  Bundler.ui.debug "Frozen, using resolution from the lockfile"
261
- last_resolve
261
+ @locked_specs
262
262
  elsif !unlocking? && nothing_changed?
263
263
  Bundler.ui.debug("Found no changes, using resolution from the lockfile")
264
- last_resolve
264
+ SpecSet.new(filter_specs(@locked_specs, @dependencies.select{|dep| @locked_specs[dep].any? }))
265
265
  else
266
+ last_resolve = converge_locked_specs
266
267
  # Run a resolve against the locally available gems
267
268
  Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
268
269
  expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, true)
@@ -464,6 +465,10 @@ module Bundler
464
465
 
465
466
  private
466
467
 
468
+ def filter_specs(specs, deps)
469
+ SpecSet.new(specs).for(expand_dependencies(deps, true), false, false)
470
+ end
471
+
467
472
  def materialize(dependencies)
468
473
  specs = resolve.materialize(dependencies)
469
474
  missing_specs = specs.missing_specs
@@ -679,17 +684,17 @@ module Bundler
679
684
  end
680
685
 
681
686
  def converge_specs(specs)
682
- deps = []
683
687
  converged = []
688
+
689
+ deps = @dependencies.select do |dep|
690
+ specs[dep].any? {|s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) }
691
+ end
692
+
684
693
  specs.each do |s|
685
694
  # Replace the locked dependency's source with the equivalent source from the Gemfile
686
695
  dep = @dependencies.find {|d| s.satisfies?(d) }
687
696
 
688
- if dep && (!dep.source || s.source.include?(dep.source))
689
- deps << dep
690
- end
691
-
692
- s.source = (dep && dep.source) || sources.get(s.source) || sources.default_source unless Bundler.frozen_bundle?
697
+ s.source = (dep && dep.source) || sources.get(s.source) || sources.default_source
693
698
 
694
699
  next if @unlock[:sources].include?(s.source.name)
695
700
 
@@ -726,8 +731,7 @@ module Bundler
726
731
  end
727
732
  end
728
733
 
729
- resolve = SpecSet.new(converged)
730
- SpecSet.new(resolve.for(expand_dependencies(deps, true), false, false).reject{|s| @unlock[:gems].include?(s.name) })
734
+ SpecSet.new(filter_specs(converged, deps).reject{|s| @unlock[:gems].include?(s.name) })
731
735
  end
732
736
 
733
737
  def metadata_dependencies
@@ -804,7 +808,7 @@ module Bundler
804
808
 
805
809
  def additional_base_requirements_for_resolve
806
810
  return [] unless @locked_gems && unlocking? && !sources.expired_sources?(@locked_gems.sources)
807
- converge_specs(@locked_gems.specs).map do |locked_spec|
811
+ converge_specs(@originally_locked_specs).map do |locked_spec|
808
812
  name = locked_spec.name
809
813
  dep = Gem::Dependency.new(name, ">= #{locked_spec.version}")
810
814
  DepProxy.get_proxy(dep, locked_spec.platform)
@@ -26,8 +26,11 @@ module Bundler
26
26
  @required_ruby_version ||= _remote_specification.required_ruby_version
27
27
  end
28
28
 
29
+ # A fallback is included because the original version of the specification
30
+ # API didn't include that field, so some marshalled specs in the index have it
31
+ # set to +nil+.
29
32
  def required_rubygems_version
30
- @required_rubygems_version ||= _remote_specification.required_rubygems_version
33
+ @required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
31
34
  end
32
35
 
33
36
  def fetch_platform
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.12".freeze
4
+ VERSION = "2.3.13".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.12
4
+ version: 2.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2022-04-20 00:00:00.000000000 Z
25
+ date: 2022-05-04 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: 2.5.2
371
371
  requirements: []
372
- rubygems_version: 3.3.12
372
+ rubygems_version: 3.3.13
373
373
  signing_key:
374
374
  specification_version: 4
375
375
  summary: The best way to manage your application's dependencies