Skip to content

Commit 87017a5

Browse files
committed
Report which locked gems have no variant for the current platform
1 parent aee0bfd commit 87017a5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/bundler/definition.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,9 @@ def materialize(dependencies)
743743
loop do
744744
break if incomplete_specs.empty?
745745

746-
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
746+
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform (#{Bundler.local_platform}) though, " \
747+
"Bundler will still re-resolve dependencies. The following locked gems have no variant for it: " \
748+
"#{incomplete_specs.map(&:full_name).join(", ")}")
747749
sources.remote!
748750
reresolve_without(incomplete_specs)
749751
specs = resolve.materialize(dependencies)

spec/runtime/platform_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@
433433
gem "requires_platform_specific"
434434
G
435435

436-
expect(out).to include("lockfile does not have all gems needed for the current platform")
436+
expect(out).to include("lockfile does not have all gems needed for the current platform (x64-mingw-ucrt)")
437+
expect(out).to include("no variant for it: platform_specific-1.0-x86-mingw32")
437438
expect(the_bundle).to include_gem "platform_specific 1.0 x64-mingw-ucrt"
438439
end
439440
end

0 commit comments

Comments
 (0)