lib/rbs/collection/config/lockfile_generator.rb in rbs-3.2.0.pre.1 vs lib/rbs/collection/config/lockfile_generator.rb in rbs-3.2.0
- old
+ new
@@ -132,11 +132,15 @@
end
if locked
lockfile.gems[name] = locked
- locked[:source].dependencies_of(locked[:name], locked[:version])&.each do |dep|
- assign_stdlib(name: dep["name"], from_gem: name)
+ begin
+ locked[:source].dependencies_of(locked[:name], locked[:version])&.each do |dep|
+ assign_stdlib(name: dep["name"], from_gem: name)
+ end
+ rescue
+ RBS.logger.warn "Cannot find `#{locked[:name]}-#{locked[:version]}` gem. Using incorrect Bundler context? (#{definition.lockfile})"
end
end
end
if spec = gem_hash.fetch(name, nil)