Skip to content

Commit

Permalink
wip test annotation output
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrocha committed Jan 10, 2025
1 parent 2be1ab2 commit e319357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tapioca/commands/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ def merge_files(gem_name, contents)
return if contents.empty?

rewriter = RBI::Rewriters::Merge.new(keep: RBI::Rewriters::Merge::Keep::NONE)

content2 = T.let(nil, T.untyped)
contents.each do |content|
content2 = content
rbi = RBI::Parser.parse_string(content)
rewriter.merge(rbi)
end
Expand All @@ -257,6 +258,7 @@ def merge_files(gem_name, contents)
rescue RBI::ParseError => e
say_error("\n\n Can't import RBI file for `#{gem_name}` as it contains errors:", :yellow)
say_error(" Error: #{e.message} (#{e.location})")
say_error(content2)
nil
end

Expand Down

0 comments on commit e319357

Please sign in to comment.