bundler 4.0.9 → 4.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/bundler/build_metadata.rb +1 -1
- data/lib/bundler/injector.rb +1 -2
- data/lib/bundler/resolver/strategy.rb +6 -3
- data/lib/bundler/resolver.rb +18 -0
- data/lib/bundler/settings/validator.rb +7 -0
- data/lib/bundler/settings.rb +1 -0
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -0
- data/lib/bundler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54c40beb5b2e8ef4f0a575b9d408fe571ef2b1089099fc09d4b46a6adc4307ea
|
|
4
|
+
data.tar.gz: 591339a1a0a4512ae8c386c24b98f09ca48ed571a011141dee4874ead6555a2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15c2b8ba181ff0f418ce40b488b3d148e661992058ed0f1af8a58c3adb774b00fc39e29211c0abd22f51b85098840514fbf35dbb8c5d0c0773f0e4cf22facb8c
|
|
7
|
+
data.tar.gz: bf33570321010bd7e2283384c1331ee13bc1f3176de52c16c34a2e56b461c625fc955dfef9ba0d9b157ff0f11591892832eea06621a88facd7e187e85bd8c468
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.10 / 2026-04-08
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Ignore warnings with spec different platforms. Pull request [#8508](https://github.com/ruby/rubygems/pull/8508) by hsbt
|
|
8
|
+
* Improve error message when current platform is not in lockfile. Pull request [#9439](https://github.com/ruby/rubygems/pull/9439) by 55728
|
|
9
|
+
* Cache package version selection. Pull request [#9410](https://github.com/ruby/rubygems/pull/9410) by Edouard-chin
|
|
10
|
+
* Check happy path first when comparing gem version. Pull request [#9417](https://github.com/ruby/rubygems/pull/9417) by Edouard-chin
|
|
11
|
+
* [feature] default_cli_command for config what command bundler runs when no specific command is provided. Pull request [#8886](https://github.com/ruby/rubygems/pull/8886) by jonbarlo
|
|
12
|
+
* Introduce a fast path for comparing Gem::Version. Pull request [#9414](https://github.com/ruby/rubygems/pull/9414) by Edouard-chin
|
|
13
|
+
|
|
14
|
+
### Bug fixes:
|
|
15
|
+
|
|
16
|
+
* Restore rb_sys dependency for Rust. Pull request [#9416](https://github.com/ruby/rubygems/pull/9416) by bangseongbeom
|
|
17
|
+
|
|
3
18
|
## 4.0.9 / 2026-03-25
|
|
4
19
|
|
|
5
20
|
### Enhancements:
|
data/lib/bundler/injector.rb
CHANGED
|
@@ -80,11 +80,10 @@ module Bundler
|
|
|
80
80
|
def conservative_version(spec)
|
|
81
81
|
version = spec.version
|
|
82
82
|
return ">= 0" if version.nil?
|
|
83
|
-
segments = version.segments
|
|
84
83
|
seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2
|
|
85
84
|
|
|
86
85
|
prerelease_suffix = version.to_s.delete_prefix(version.release.to_s) if version.prerelease?
|
|
87
|
-
"#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
|
|
86
|
+
"#{version_prefix}#{version.segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
|
|
88
87
|
end
|
|
89
88
|
|
|
90
89
|
def version_prefix
|
|
@@ -5,6 +5,7 @@ module Bundler
|
|
|
5
5
|
class Strategy
|
|
6
6
|
def initialize(source)
|
|
7
7
|
@source = source
|
|
8
|
+
@package_priority_cache = {}
|
|
8
9
|
end
|
|
9
10
|
|
|
10
11
|
def next_package_and_version(unsatisfied)
|
|
@@ -17,10 +18,12 @@ module Bundler
|
|
|
17
18
|
|
|
18
19
|
def next_term_to_try_from(unsatisfied)
|
|
19
20
|
unsatisfied.min_by do |package, range|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
@package_priority_cache[[package, range]] ||= begin
|
|
22
|
+
matching_versions = @source.versions_for(package, range)
|
|
23
|
+
higher_versions = @source.versions_for(package, range.upper_invert)
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
[matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
|
|
26
|
+
end
|
|
24
27
|
end
|
|
25
28
|
end
|
|
26
29
|
|
data/lib/bundler/resolver.rb
CHANGED
|
@@ -353,9 +353,27 @@ module Bundler
|
|
|
353
353
|
message << "\n#{other_specs_matching_message(specs, matching_part)}"
|
|
354
354
|
end
|
|
355
355
|
|
|
356
|
+
if specs_matching_requirement.any? && (hint = platform_mismatch_hint)
|
|
357
|
+
message << "\n\n#{hint}"
|
|
358
|
+
end
|
|
359
|
+
|
|
356
360
|
raise GemNotFound, message
|
|
357
361
|
end
|
|
358
362
|
|
|
363
|
+
def platform_mismatch_hint
|
|
364
|
+
locked_platforms = Bundler.locked_gems&.platforms
|
|
365
|
+
return unless locked_platforms
|
|
366
|
+
|
|
367
|
+
local_platform = Bundler.local_platform
|
|
368
|
+
return if locked_platforms.include?(local_platform)
|
|
369
|
+
return if locked_platforms.any? {|p| p == Gem::Platform::RUBY }
|
|
370
|
+
|
|
371
|
+
"Your current platform (#{local_platform}) is not included in the lockfile's platforms (#{locked_platforms.join(", ")}). " \
|
|
372
|
+
"Add the current platform to the lockfile with\n`bundle lock --add-platform #{local_platform}` and try again."
|
|
373
|
+
rescue GemfileNotFound
|
|
374
|
+
nil
|
|
375
|
+
end
|
|
376
|
+
|
|
359
377
|
def filtered_versions_for(package)
|
|
360
378
|
@gem_version_promoter.filter_versions(package, @all_versions[package])
|
|
361
379
|
end
|
|
@@ -74,6 +74,13 @@ module Bundler
|
|
|
74
74
|
fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
|
+
|
|
78
|
+
rule %w[default_cli_command], "default_cli_command must be either 'install' or 'cli_help'" do |key, value, _settings|
|
|
79
|
+
valid_values = %w[install cli_help]
|
|
80
|
+
if !value.nil? && !valid_values.include?(value.to_s)
|
|
81
|
+
fail!(key, value, "must be one of: #{valid_values.join(", ")}")
|
|
82
|
+
end
|
|
83
|
+
end
|
|
77
84
|
end
|
|
78
85
|
end
|
|
79
86
|
end
|
data/lib/bundler/settings.rb
CHANGED
|
@@ -52,6 +52,7 @@ module Bundler
|
|
|
52
52
|
|
|
53
53
|
# This is defined directly to avoid having to loading the full spec
|
|
54
54
|
def missing_extensions?
|
|
55
|
+
return false if RUBY_ENGINE == "jruby"
|
|
55
56
|
return false if default_gem?
|
|
56
57
|
return false if extensions.empty?
|
|
57
58
|
return false if File.exist? gem_build_complete_path
|
|
@@ -40,6 +40,9 @@ Gem::Specification.new do |spec|
|
|
|
40
40
|
|
|
41
41
|
# Uncomment to register a new dependency of your gem
|
|
42
42
|
# spec.add_dependency "example-gem", "~> 1.0"
|
|
43
|
+
<%- if config[:ext] == 'rust' -%>
|
|
44
|
+
spec.add_dependency "rb_sys", "~> 0.9.91"
|
|
45
|
+
<%- end -%>
|
|
43
46
|
<%- if config[:ext] == 'go' -%>
|
|
44
47
|
spec.add_dependency "go_gem", "~> 0.2"
|
|
45
48
|
<%- end -%>
|
data/lib/bundler/version.rb
CHANGED