[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
- Create a new Rails application.
- Add
packwerk
to itsGemfile
- Run
bundle install
- Run
bundle binstub packwerk
- Run
bin/packwerk init
- 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
tqhung04 commented
I got the same issue here. Could anyone fix that? ><
irphilli commented
This a due to a bug in prism: ruby/prism#2688
If you downgrade prism to 0.24.0, the error goes away.
a-abdellatif98 commented
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,
exterm commented
Should be resolved in prism 0.27.0.
rafaelfranca commented
Closing since it is fixed on prism.