Closed sushant-here closed 3 years ago
Can confirm that downgrading to 2.6.1 fixes the issue.
Thanks for the report. Sounds like #477 from @hborawski may have introduced this. Any chance you have a reducible test case?
The stack trace does lead to code i added, but I don't know how to reproduce this, I did the development for the feature on Xcode 12.3 and 12.4, and did not run into this at all.
Happy to provide a fix once I can get it reproduced
I get the following error:...
bundle exec slather coverage --html --show --build-directory fastlane/build --output-directory fastlane/code_coverage/html --scheme App+UnitTests --workspace Work.xcworkspace App/App.xcodeproj
Slathering... bundler: failed to load command: slather (/Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/bin/slather) TypeError: nil can't be coerced into Integer /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:199:in
-' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:199:in
block (8 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:194:inmap' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:194:in
block (7 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:395:ininsert' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:378:in
method_missing' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:190:inblock (6 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:395:in
insert' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:378:inmethod_missing' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:189:in
block (5 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:185:ineach' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:185:in
each_with_index' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:185:inblock (4 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:395:in
insert' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:378:inmethod_missing' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:184:in
block (3 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:174:ineach' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:174:in
block (2 levels) in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:395:ininsert' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:378:in
method_missing' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:173:inblock in create_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:296:in
initialize' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:255:innew' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.1-x86_64-darwin/lib/nokogiri/xml/builder.rb:255:in
with' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:154:increate_html_from_file' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:140:in
block in create_htmls_from_files' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:140:inmap' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:140:in
create_htmls_from_files' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:49:increate_html_reports' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/coverage_service/html_output.rb:26:in
post' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/command/coverage_command.rb:101:inpost' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/lib/slather/command/coverage_command.rb:61:in
execute' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:inrun' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in
execute' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:inrun' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in
run' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/gems/slather-2.7.0/bin/slather:17:in<top (required)>' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/bin/slather:23:in
load' /Users/me/xcodeProjects/App/vendor/bundle/ruby/2.6.0/bin/slather:23:in `<top (required)>'