actionview_precompiler icon indicating copy to clipboard operation
actionview_precompiler copied to clipboard

Include filename in compilation errors

Open camertron opened this issue 1 year ago • 1 comments

I was working in the GitHub dotcom monolith today and noticed a bunch of CI failures with CompilationError stack traces from actionview_precompiler. The failures were happening because of a missed git merge conflict in a Rails template I had mistakenly committed. Unfortunately the CompilationErrors didn't mention the filename of the template that failed to parse, so I had no idea which template was to blame. I opened up the code and modified it to pass the filename down to where the error was raised and was ultimately able to find and correct the merge conflict. I thought it would be a nice improvement to upstream my changes 😄

camertron avatar Jul 19 '24 17:07 camertron

Hah I see @HParker did something similar in https://github.com/jhawthorn/actionview_precompiler/pull/27, although it does not appear to include the filename in CompilationErrors.

camertron avatar Jul 19 '24 17:07 camertron

Thank you!

jhawthorn avatar Sep 10 '24 22:09 jhawthorn