You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bundler/spec/install/gems/resolving_spec.rb
+57-1Lines changed: 57 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -416,7 +416,7 @@
416
416
end
417
417
418
418
nice_error=<<~E.strip
419
-
Could not find gem 'sorbet-static (= 0.5.10554)' with platforms 'arm64-darwin-21', 'aarch64-linux' in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
419
+
Could not find gems matching 'sorbet-static (= 0.5.10554)' valid for all resolution platforms (arm64-darwin-21, aarch64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
420
420
421
421
The source contains the following gems matching 'sorbet-static (= 0.5.10554)':
422
422
* sorbet-static-0.5.10554-universal-darwin-21
@@ -425,6 +425,62 @@
425
425
end
426
426
end
427
427
428
+
context"when adding a new gem that does not resolve under all locked platforms"do
429
+
beforedo
430
+
simulate_platform"x86_64-linux"do
431
+
build_repo4do
432
+
build_gem"nokogiri","1.14.0"do |s|
433
+
s.platform="x86_64-linux"
434
+
end
435
+
build_gem"nokogiri","1.14.0"do |s|
436
+
s.platform="arm-linux"
437
+
end
438
+
439
+
build_gem"sorbet-static","0.5.10696"do |s|
440
+
s.platform="x86_64-linux"
441
+
end
442
+
end
443
+
444
+
lockfile<<~L
445
+
GEM
446
+
remote: #{file_uri_for(gem_repo4)}/
447
+
specs:
448
+
nokogiri (1.14.0-arm-linux)
449
+
nokogiri (1.14.0-x86_64-linux)
450
+
451
+
PLATFORMS
452
+
arm-linux
453
+
x86_64-linux
454
+
455
+
DEPENDENCIES
456
+
nokogiri
457
+
458
+
BUNDLED WITH
459
+
#{Bundler::VERSION}
460
+
L
461
+
462
+
gemfile<<~G
463
+
source "#{file_uri_for(gem_repo4)}"
464
+
465
+
gem "nokogiri"
466
+
gem "sorbet-static"
467
+
G
468
+
469
+
bundle"lock",:raise_on_error=>false
470
+
end
471
+
end
472
+
473
+
it"raises a proper error"do
474
+
nice_error=<<~E.strip
475
+
Could not find gems matching 'sorbet-static' valid for all resolution platforms (arm-linux, x86_64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
476
+
477
+
The source contains the following gems matching 'sorbet-static':
478
+
* sorbet-static-0.5.10696-x86_64-linux
479
+
E
480
+
expect(err).toend_with(nice_error)
481
+
end
482
+
end
483
+
428
484
it"gives a meaningful error on ruby version mismatches between dependencies"do
0 commit comments