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

RubyTrackerTest fail using ruby 3.3.0dev since ruby/ruby#8573 #49464

Closed
yahonda opened this issue Oct 3, 2023 · 2 comments · Fixed by #49547
Closed

RubyTrackerTest fail using ruby 3.3.0dev since ruby/ruby#8573 #49464

yahonda opened this issue Oct 3, 2023 · 2 comments · Fixed by #49547

Comments

@yahonda
Copy link
Member

yahonda commented Oct 3, 2023

Managed to reproduce CI failure at https://buildkite.com/rails/rails/builds/100319#018af314-f0bd-4ea0-ae84-f2f576479e56/1090-1099

Steps to reproduce

  1. Install ruby 3.3.0dev including Adopt prism CallNode#name changes ruby/ruby#8573
cd actionview
bin/test test/template/dependency_tracker_test.rb -n /test_finds_dependenc/

Expected behavior

It should pass.

Actual behavior

$ bin/test test/template/dependency_tracker_test.rb -n /test_finds_dependenc/
Running 39 tests in a single process (parallelization threshold is 50)
Run options: -n /test_finds_dependenc/ --seed 56149

# Running:

E

Error:
RubyTrackerTest#test_finds_dependencies_on_method_chains:
NoMethodError: undefined method `pluralize' for an instance of Symbol
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:120:in `render_call_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:18:in `render_calls'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:32:in `render_dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:13:in `dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/test/template/dependency_tracker_test.rb:158:in `test_finds_dependencies_on_method_chains'


bin/test test/template/dependency_tracker_test.rb:154

..E

Error:
RubyTrackerTest#test_finds_dependencies_with_extra_spaces:
NoMethodError: undefined method `pluralize' for an instance of Symbol
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:120:in `render_call_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:18:in `render_calls'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:32:in `render_dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:13:in `dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/test/template/dependency_tracker_test.rb:197:in `test_finds_dependencies_with_extra_spaces'


bin/test test/template/dependency_tracker_test.rb:179

E

Error:
RubyTrackerTest#test_finds_dependency_in_correct_directory:
NoMethodError: undefined method `pluralize' for an instance of Symbol
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:120:in `render_call_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:18:in `render_calls'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:32:in `render_dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:13:in `dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/test/template/dependency_tracker_test.rb:85:in `test_finds_dependency_in_correct_directory'


bin/test test/template/dependency_tracker_test.rb:81

E

Error:
RubyTrackerTest#test_finds_dependencies_with_bare_assoc_hash_on_constant:
NoMethodError: undefined method `pluralize' for an instance of Symbol
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:120:in `render_call_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:18:in `render_calls'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:32:in `render_dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:13:in `dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/test/template/dependency_tracker_test.rb:209:in `test_finds_dependencies_with_bare_assoc_hash_on_constant'


bin/test test/template/dependency_tracker_test.rb:200

..E

Error:
RubyTrackerTest#test_finds_dependency_in_correct_directory_with_underscore:
NoMethodError: undefined method `pluralize' for an instance of Symbol
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:120:in `render_call_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/render_parser/prism_render_parser.rb:18:in `render_calls'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:32:in `render_dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/dependency_tracker/ruby_tracker.rb:13:in `dependencies'
    /home/yahonda/src/github.com/rails/rails/actionview/test/template/dependency_tracker_test.rb:92:in `test_finds_dependency_in_correct_directory_with_underscore'


bin/test test/template/dependency_tracker_test.rb:88

.........

Finished in 0.010077s, 1786.3040 runs/s, 1290.1085 assertions/s.
18 runs, 13 assertions, 0 failures, 5 errors, 0 skips
$

System configuration

Rails version: main branch

Ruby version: ruby 3.3.0dev (2023-10-02T13:18:56Z master 87dad067e0) [x86_64-linux]

@yahonda
Copy link
Member Author

yahonda commented Oct 3, 2023

Related to ruby/ruby#8573
ruby/prism#1533

@yahonda
Copy link
Member Author

yahonda commented Oct 9, 2023

#49547 should fix this issue.

amatsuda added a commit that referenced this issue Oct 9, 2023
…uralize_error

"NoMethodError: undefined method `pluralize' for an instance of Symbol" in PrismRenderParser

fixes #49464
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant