Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: uninitialized constant Parser::Ruby33 #9

Open
KieranP opened this issue Nov 26, 2024 · 1 comment
Open

Error: uninitialized constant Parser::Ruby33 #9

KieranP opened this issue Nov 26, 2024 · 1 comment

Comments

@KieranP
Copy link

KieranP commented Nov 26, 2024

I'm getting 1000s of these parsing errors. Seems that it doesn't support Ruby 3.3.4?

An error occurred while Obsession/Rspec/DescribePublicMethod cop was inspecting /Volumes/Work/spec/models/user.rb:10:2.
uninitialized constant Parser::Ruby33
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:97:in `const_get'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:97:in `parse_file'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:73:in `private_methods'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:58:in `block in on_block'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:56:in `on_context_method'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-obsession-0.1.11/lib/rubocop/cop/obsession/rspec/describe_public_method.rb:56:in `on_block'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:107:in `public_send'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:105:in `each'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:69:in `on_block'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.36.1/lib/rubocop/ast/traversal.rb:137:in `block in on_dstr'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.36.1/lib/rubocop/ast/traversal.rb:137:in `each'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.36.1/lib/rubocop/ast/traversal.rb:137:in `on_dstr'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:71:in `on_begin'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.36.1/lib/rubocop/ast/traversal.rb:158:in `on_block'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-ast-1.36.1/lib/rubocop/ast/traversal.rb:20:in `walk'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/commissioner.rb:87:in `investigate'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/team.rb:174:in `investigate_partial'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cop/team.rb:108:in `investigate'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:349:in `block in inspect_file'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:348:in `each'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:348:in `flat_map'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:348:in `inspect_file'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:291:in `block in do_inspection_loop'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:325:in `block in iterate_until_no_changes'
<internal:kernel>:187:in `loop'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:318:in `iterate_until_no_changes'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:287:in `do_inspection_loop'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:168:in `block in file_offenses'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:193:in `file_offense_cache'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:167:in `file_offenses'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:103:in `block in warm_cache'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:650:in `call_with_index'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:620:in `process_incoming_jobs'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:600:in `block in worker'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:591:in `fork'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:591:in `worker'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:582:in `block in create_workers'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:581:in `each'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:581:in `each_with_index'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:581:in `create_workers'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:520:in `work_in_processes'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:291:in `map'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/parallel-1.26.3/lib/parallel.rb:235:in `each'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:103:in `warm_cache'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/runner.rb:76:in `run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/command.rb:11:in `run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli/environment.rb:18:in `run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli.rb:122:in `run_command'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli.rb:129:in `execute_runners'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli.rb:51:in `block in run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli.rb:81:in `profile_if_needed'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/lib/rubocop/cli.rb:43:in `run'
/Users/kieran/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rubocop-1.68.0/exe/rubocop:19:in `<top (required)>'
bin/rubocop:8:in `load'
bin/rubocop:8:in `<main>'
@jeromedalbert
Copy link
Owner

jeromedalbert commented Nov 27, 2024

Thanks for the report! I cannot repro but it looks like an issue where the Parser::Ruby33 class is not yet required at that point in time. I just pushed 1349bdd which simplifies things and uses a Rubocop helper that should always require the parser.

Maybe that'll fix your issue. Can you update rubocop-obsession to the latest version and let me know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants