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

debug usefulness #211

Open
epipheus opened this issue Jul 28, 2020 · 1 comment
Open

debug usefulness #211

epipheus opened this issue Jul 28, 2020 · 1 comment

Comments

@epipheus
Copy link

epipheus commented Jul 28, 2020

I have been noticing a pattern in sassc segfaults that every is having. There are several interesting ones and I think I can help eliminate most of them. 99% of the time, it crashes in engine.rb at the line status = Native.compile_data_context(data_context)

error messages look like this at compile time:

SassC::SyntaxError: Error: Invalid CSS after "}": expected 1 selector or at-rule, was ".,.check-success,.c"
        on line 23:2 of stdin
>> }

This is totally useless most of the time. Like I can't really look at line 23 of every single file and I should have to run scripts to find all files with the tiny snippet above. Sometimes a selector can be use in 100s of files!!

More often than not there is some stupid offending line in one of 30,000 files in a gemified vendor set of assets which is quite annoying to track down. I tend to track them down quite quickly by old school print statements. 100% of the time I track things down by printing out the full template being compiled before it crashes. The last one before the crash is the one. With the full template its much easier to fid the offending file but this is still quite ridiculous. Literally if your error message included the file name it would be lifechanging for all of us!!!

so why is filename ALWAYS nil in engine.rb!!!! This would save us soooo much! Is it always stdin from sassc's perspective and not a file? How is this fed from the rails asset precompile?

@facundofarias
Copy link

Hello @epipheus, any news on this?
Thanks

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