You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running spoom bump for a file that contains non-US-ASCII characters I receive an error invalid byte sequence in US-ASCII (ArgumentError)
Details
$ bundle exec spoom bump npm_and_yarn/spec/dependabot/npm_and_yarn/package_name_spec.rb
Checking files...
bundler: failed to load command: spoom (/usr/local/rvm/gems/ruby-3.1.4/bin/spoom)
/usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/sorbet/errors.rb:52:in `match?': invalid byte sequence in US-ASCII (ArgumentError)
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/sorbet/errors.rb:52:in `block in parse'
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/sorbet/errors.rb:51:in `each_line'
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/sorbet/errors.rb:51:in `parse'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `bind_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `validate_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/_methods.rb:275:in `block in _on_method_added'
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/sorbet/errors.rb:38:in `parse_string'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `bind_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `validate_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/_methods.rb:275:in `block in _on_method_added'
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/lib/spoom/cli/bump.rb:144:in `bump'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `bind_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/call_validation.rb:256:in `validate_call'
from /usr/local/rvm/gems/ruby-3.1.4/gems/sorbet-runtime-0.5.11012/lib/types/private/methods/_methods.rb:275:in `block in _on_method_added'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
from /usr/local/rvm/gems/ruby-3.1.4/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
from /usr/local/rvm/gems/ruby-3.1.4/gems/spoom-1.2.3/exe/spoom:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-3.1.4/bin/spoom:25:in `load'
from /usr/local/rvm/gems/ruby-3.1.4/bin/spoom:25:in `<top (required)>'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `load'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli.rb:492:in `exec'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli.rb:34:in `dispatch'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/cli.rb:28:in `start'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/exe/bundle:37:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
from /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.19/exe/bundle:29:in `<top (required)>'
from /usr/local/rvm/gems/ruby-3.1.4/bin/bundle:25:in `load'
from /usr/local/rvm/gems/ruby-3.1.4/bin/bundle:25:in `<main>'
from /usr/local/rvm/gems/ruby-3.1.4/bin/ruby_executable_hooks:22:in `eval'
from /usr/local/rvm/gems/ruby-3.1.4/bin/ruby_executable_hooks:22:in `<main>'
Thanks for taking the time to look into this. I also haven't been able to reproduce the error since upgrading to v1.2.4 either. I assume some commit or dependency upgrade between v1.2.3 and v1.2.4 fixed it.
Describe the bug
When running
spoom bump
for a file that contains non-US-ASCII characters I receive an errorinvalid byte sequence in US-ASCII (ArgumentError)
Details
The specific sequence is the emoji here:
https://github.com/dependabot/dependabot-core/blob/bf037aa4c891c6d5801211dfb9c76a643f4d05d8/npm_and_yarn/spec/dependabot/npm_and_yarn/package_name_spec.rb#L28
To Reproduce
Spoom version: 1.2.3
Steps to reproduce the behavior:
dependabot-core
bundle install
bundle exec spoom bump npm_and_yarn/spec/dependabot/npm_and_yarn/package_name_spec.rb
Expected behavior
No error
I've tried various ways of specifying the file encoding using magic comments:
But none of them work. What does work is adding a UTF-8 BOM.
The text was updated successfully, but these errors were encountered: