SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.55k stars 233 forks source link

Ruby 3.2.0 issue #529

Closed hongbo-miao closed 1 year ago

hongbo-miao commented 1 year ago

After updating to Ruby 3.2.0, I got this error. Any idea? Thanks! 😃

Run bundle exec slather
Slathering...
bundler: failed to load command: slather (/ios-app/vendor/bundle/ruby/3.2.0/bin/slather)
/ios-app/vendor/bundle/ruby/3.2.0/gems/slather-2.7.3/lib/slather/project.rb:506:in `find_binary_files': undefined method `exists?' for File:Class (NoMethodError)

        raise StandardError, "No scheme named '#{self.scheme}' found in #{self.path}" unless File.exists? xcscheme_path
                                                                                                 ^^^^^^^^
Did you mean?  exist?
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/slather-2.7.3/lib/slather/project.rb:456:in `configure_binary_file'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/slather-2.7.3/lib/slather/project.rb:336:in `configure'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/slather-2.7.3/lib/slather/command/coverage_command.rb:59:in `execute'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
    from /ios-app/vendor/bundle/ruby/3.2.0/gems/slather-2.7.3/bin/slather:17:in `<top (required)>'
    from /ios-app/vendor/bundle/ruby/3.2.0/bin/slather:25:in `load'
    from /ios-app/vendor/bundle/ruby/3.2.0/bin/slather:25:in `<top (required)>'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `load'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:23:in `run'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli.rb:486:in `exec'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli.rb:31:in `dispatch'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/cli.rb:25:in `start'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/exe/bundle:48:in `block in <top (required)>'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.26/exe/bundle:36:in `<top (required)>'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/bin/bundle:25:in `load'
    from /Users/runner/hostedtoolcache/Ruby/3.2.0/x64/bin/bundle:25:in `<main>'
undefined method `exists?' for File:Class

    Are you sure your project is generating coverage? Make sure you enable code coverage in the Test section of your Xcode scheme.
    Did you specify your Xcode scheme? (--scheme or 'scheme' in .slather.yml)
    If you're using a workspace, did you specify it? (--workspace or 'workspace' in .slather.yml)
    If you use a different Xcode configuration, did you specify it? (--configuration or 'configuration' in .slather.yml)