Shopify/packwerk

[Bug Report] Syntax error: Invalid yield in a brand new Rails application

fxn opened this issue · 5 comments

fxn commented

Description

bin/packwerk check does not pass in a just generated Rails application, the command complains about the ERB templates.

To Reproduce

  1. Create a new Rails application.
  2. Add packwerk to its Gemfile
  3. Run bundle install
  4. Run bundle binstub packwerk
  5. Run bin/packwerk init
  6. Run bin/packwerk check

Expected Behaviour

bin/packwerk check passes.

Actual Behaviour

% bin/packwerk check
📦 Packwerk is inspecting 28 files
E.EE........................
📦 Finished in 1.4 seconds

app/views/layouts/application.html.erb
Syntax error: Invalid yield

app/views/layouts/mailer.html.erb
Syntax error: Invalid yield

app/views/layouts/mailer.text.erb
Syntax error: Invalid yield

3 offenses detected

No stale violations detected

Version Information

  • Packwerk: 3.2.0
  • Ruby: 3.3.0
  • Rails: 7.1

I got the same issue here. Could anyone fix that? ><

This a due to a bug in prism: ruby/prism#2688

If you downgrade prism to 0.24.0, the error goes away.

This a due to a bug in prism: ruby/prism#2688

If you downgrade prism to 0.24.0, the error goes away.

@irphilli fixed the issue to me, Thanks,

Closing since it is fixed on prism.