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

Regression with 3.21.0 and render_inline #2187

Open
tvdeyen opened this issue Dec 20, 2024 · 1 comment
Open

Regression with 3.21.0 and render_inline #2187

tvdeyen opened this issue Dec 20, 2024 · 1 comment

Comments

@tvdeyen
Copy link

tvdeyen commented Dec 20, 2024

Steps to reproduce

See this failed CircleCI run of Solidus https://app.circleci.com/pipelines/github/solidusio/solidus/7226/workflows/289fdaa9-334f-4c14-ad3c-0af8222f7da9/jobs/67674

The Component Spec can be found at https://github.com/solidusio/solidus/blob/main/admin/spec/components/solidus_admin/base_component_spec.rb#L14

The component can be found at https://github.com/solidusio/solidus/blob/main/admin/app/components/solidus_admin/base_component.rb

Expected behavior

Test does not fail with syntax error

Actual behavior

Test does fails with syntax error

Backtrace:

SyntaxError:
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:98: syntax error, unexpected local variable or method, expecting '}'
       ...in <top (required)>') component rendered HTML-unsafe output....
       ...                      ^~~~~~~~~
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:98: syntax error, unexpected local variable or method, expecting `do' or '{' or '('
       ...ent rendered HTML-unsafe output. The output will be automati...
       ...                         ^~~~~~
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:98: syntax error, unexpected local variable or method, expecting `do' or '{' or '('
       ... automatically escaped, but you may want to investigate.') } 
       ...                            ^~~
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:98: syntax error, unexpected string literal
       ...t you may want to investigate.') } 
       ...                              ^
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:99: unterminated string meets end of file
             end
                ^
       /home/circleci/solidus/vendor/bundle/ruby/3.1.0/gems/view_component-3.21.0/lib/view_component/compiler.rb:99: syntax error, unexpected end-of-input, expecting `end'
             end

System configuration

Rails version:

7.0, 7.1, 7.2

Ruby version:

3.1, 3.2, 3.3

Gem version:

3.21.0

It works with 3.20.0

@joelhawksley
Copy link
Member

joelhawksley commented Dec 20, 2024

@tvdeyen interesting! Do you have time to open a failing test here for this use case? I do see that you are getting the HTML safety warning that we improved in 3.21, so I'm wondering if that's part of the issue.

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

No branches or pull requests

2 participants