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

syntax errors fail silently #21

Closed
bradphelan opened this issue Jan 30, 2012 · 3 comments
Closed

syntax errors fail silently #21

bradphelan opened this issue Jan 30, 2012 · 3 comments

Comments

@bradphelan
Copy link

I don't get any errors if there is a syntax error in my less file. Is this intended behaviour or is there some configuration option to turn this on. I get semantic errors passed to my html such as that some mixin is not defined but if I just type some crap into the file then nothing is reported.

@metaskills
Copy link
Owner

That is a feature of (1) less itself, then (2) tilt which is under (3) sprockets which renders a page using tilts parse errors. So it should work just fine. I do not know of any configuration values to make it happen either. Should be on by default.

I just did a check with lessc at the command line and no errors. So perhaps less does not report errors? I'll have to investigate further. This could be a bug with Less.js or Less.rb.

@bradphelan
Copy link
Author

There is a problem with the less GEM

----------------------
gems/less-2.0.9/lib/less/parser.rb
----------------------
62     def parse(less)
63       calljs do
64         error,tree = nil
65         @parser.parse(less, lambda {|e, t|
66           error = e; tree = t
67         })
68         raise Exception.new(error.message) if error
69         Tree.new(tree) if tree
70       end
71     end

Adding the highlighted line on line 68 in the gem work brilliantly. However
I think this is the wrong place for this and it is a work around not a fix but
it helps me at the moment port all my files from scss to less :)

@metaskills
Copy link
Owner

I'm gonna close this ticket as I think this issue (cowboyd/less.rb#19) on less.rb addresses. it. If not and I am blocking that or need to do anything with less-rails, please let me know and I'll open this ticket up. Cheers! BTW, I love Jasminerice. Been doing a series of articles on it as I test my upcoming project using Spine.JS. Cheers!

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