jhawthorn/actionview_precompiler

How to continue if we run into errors during precompilation?

krtschmr opened this issue · 1 comments

Loading development environment (Rails 6.0.0)
[1] pry(main)> ActionviewPrecompiler.precompile
NoMethodError: undefined method `identifier' for #<ActionviewPrecompiler::TemplateParser::FakeTemplate:0x00007fa9b9131fb8>
from /home/tim/.rvm/gems/ruby-2.6.3/gems/haml-5.1.2/lib/haml/plugin.rb:16:in `compile'

i have no idea how to go on from here

i could track down the error while debugging the gem and i got stuck inside an index.haml

#index.haml
=render template: "internal/shared/history"
=pagination

that template is rendering a few other partials

image

data via controller is the following, but that shouldn't be related i guess

    @pagy, @references = pagy( q, items: 20, count: q.to_a.count)
    @entries = Ledger::Entry.where(reference: @references.to_a.pluck(:reference))

so what am i doing wrong? i wouldn't expect an error but maybe i misunderstand the gem

Ah! This was fixed by 4624a70 but I hadn't cut a release since then. I've just released 0.2.1 which should include the fix.

Thanks for testing this out!