Skip to content

Commit d1e6caa

Browse files
Mousa96hsbt
authored andcommitted
Report which locked gems have no variant for the current platform
1 parent 9a10026 commit d1e6caa

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
@@ -772,7 +772,9 @@ def materialize(dependencies)
772772
loop do
773773
break if incomplete_specs.empty?
774774

775-
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
775+
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform (#{Bundler.local_platform}) though, " \
776+
"Bundler will still re-resolve dependencies. The following locked gems have no variant for it: " \
777+
"#{incomplete_specs.map(&:full_name).join(", ")}")
776778
sources.remote!
777779
reresolve_without(incomplete_specs)
778780
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)