diff options
author | David RodrÃguez <[email protected]> | 2025-03-25 14:46:35 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-03-31 09:39:22 +0900 |
commit | dea505dea014c45062fb2963d4eb770be1497a4a () | |
tree | f60014bd2dc412567690bea0dbb358c46964c914 | |
parent | b2bcd360441c334f16148908684e9b409eac4949 (diff) |
[rubygems/rubygems] Allow ruby platform to be remove also when dependencies have changed
Since we will now add it back if the final resolution is compatible, we can also get this kind of edge case (`bundle add`) working. https://.com/rubygems/rubygems/commit/cdc5ebec77
-rw-r--r-- | lib/bundler/definition.rb | 10 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/specific_platform_spec.rb | 74 |
2 files changed, 82 insertions, 2 deletions
@@ -1144,8 +1144,14 @@ module Bundler @originally_invalid_platforms = platforms.select do |platform| next if local_platform == platform || - @new_platforms.include?(platform) || - @dependency_changes spec_set_incomplete_for_platform?(@originally_locked_specs, platform) end @@ -752,6 +752,80 @@ RSpec.describe "bundle install with specific platforms" do L end it "automatically fixes the lockfile if multiple platforms locked, but no valid versions of direct dependencies for all of them" do simulate_platform "x86_64-linux" do build_repo4 do |