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

Errors #9

Closed
ahmedelgabri opened this issue Apr 9, 2013 · 13 comments
Closed

Errors #9

ahmedelgabri opened this issue Apr 9, 2013 · 13 comments

Comments

@ahmedelgabri
Copy link

I have some feedback on the error messages.

After installing it & I was debugging an old CSS file & I got this error

I runned csscss -v body.css I got this `Had a problem parsing the css at line: 1, column: 1
Run with CSSCSS_DEBUG=true for verbose parser errors'

I would prefer if the debug feature is a flag something like --debug or --debug=true instead cause when I wrote this csscss --help it didn't say anything about how can I turn debug on.

secondly, after I tweeted you & you replied back that I need to run the command like this CSSCSS_DEBUG=true csscss -v body.css I got another error Had a problem parsing the css at line: 1, column: 1 Failed to match sequence (SPACE? blocks:((COMMENT / NESTED_RULESET / RULESET) {1, }) SPACE?) at line 1957 char 1. - Don't know what to do with "p.contactu" at line 1957 char 1.

actually the selector was p.contactussubheading excuse the bad selector name, apparently that's why I needed this tool so I can debug this file :) The problem actually was at line 1964.

Lastly, I think the output will be very helpful if it has line numbers, right now it looks like this

{.selector} AND {#selector} share 10 rules -moz-border-radius: 2px 0px 0px 2px another: rule; another-rule; ...

Maybe something like this will be better

L:20 {.selector} AND L:45 {#selector} share 10 rules -moz-border-radius: 2px 0px 0px 2px another: rule; another-rule; ...

@zmoazeni
Copy link
Owner

zmoazeni commented Apr 9, 2013

Thanks for all the great feedback! I'll try incorporating some of them soon.

@beesman
Copy link

beesman commented Apr 9, 2013

Hi Zach,

I get a whole bunch of syntax errors when running this:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:29: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' (SyntaxError) sass_options = {cache:false} ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:45: syntax error, unexpected ':', expecting ')' ...ontents).redundancies(minimum: @minimum, ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:46: syntax error, unexpected ':', expecting '=' ... ignored_properties: @ignored_properties, ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:47: syntax error, unexpected ':', expecting '=' ... ignored_selectors: @ignored_selectors) ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:63: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' ...eport(verbose:@verbose, color:true) ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:67: syntax error, unexpected kRESCUE, expecting kEND rescue Parslet::ParseFailed => e ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:67: syntax error, unexpected tASSOC rescue Parslet::ParseFailed => e ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:79: syntax error, unexpected kDO_BLOCK, expecting kEND opts = OptionParser.new do |opts| ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:83: syntax error, unexpected kDO_BLOCK, expecting kEND opts.on("-v", "--[no-]verbose", "Display each rule") do |v| ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:87: syntax error, unexpected kDO_BLOCK, expecting kEND opts.on("--[no-]color", "Colorizes output") do |c| ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:91: syntax error, unexpected kDO_BLOCK, expecting kEND ...many rules. Defaults to 3") do |n| ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:95: syntax error, unexpected kDO_BLOCK, expecting kEND ...ties when finding matches") do |ignored_properties| ^ /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:99: syntax error, unexpected kDO_BLOCK, expecting $end ...tors when finding matches") do |ignored_selectors| ^ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss.rb:11
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/bin/csscss:3
from /usr/bin/csscss:19:in `load'
from /usr/bin/csscss:19

Any help appreciated - thanks.

@zmoazeni
Copy link
Owner

zmoazeni commented Apr 9, 2013

@beesman Your issue sounds the same as #11

@nilsborg
Copy link

@beesman @zmoazeni I'm getting exactly the same thing..
Mountain Lion, Ruby 1.8.7

@zmoazeni
Copy link
Owner

@nilsborchers Yeah 1.8.7 isn't supported only 1.9.x+

@zmoazeni zmoazeni mentioned this issue Apr 10, 2013
@nilsborg
Copy link

hmm ok i updated to 1.9.3 now and am getting similar stuff:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:29: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' (SyntaxError)
          sass_options = {cache:false}
                                ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:45: syntax error, unexpected ':', expecting ')'
...ontents).redundancies(minimum:           @minimum,
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:46: syntax error, unexpected ':', expecting '='
...           ignored_properties: @ignored_properties,
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:47: syntax error, unexpected ':', expecting '='
...            ignored_selectors:  @ignored_selectors)
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:63: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '('
...eport(verbose:@verbose, color:true)
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:67: syntax error, unexpected kRESCUE, expecting kEND
    rescue Parslet::ParseFailed => e
          ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:67: syntax error, unexpected tASSOC
    rescue Parslet::ParseFailed => e
                                  ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:79: syntax error, unexpected kDO_BLOCK, expecting kEND
      opts = OptionParser.new do |opts|
                                ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:83: syntax error, unexpected kDO_BLOCK, expecting kEND
        opts.on("-v", "--[no-]verbose", "Display each rule") do |v|
                                                               ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:87: syntax error, unexpected kDO_BLOCK, expecting kEND
        opts.on("--[no-]color", "Colorizes output") do |c|
                                                      ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:91: syntax error, unexpected kDO_BLOCK, expecting kEND
...many rules. Defaults to 3") do |n|
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:95: syntax error, unexpected kDO_BLOCK, expecting kEND
...ties when finding matches") do |ignored_properties|
                              ^
/Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb:99: syntax error, unexpected kDO_BLOCK, expecting $end
...tors when finding matches") do |ignored_selectors|
                              ^
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
    from /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/lib/csscss.rb:11
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
    from /Library/Ruby/Gems/1.8/gems/csscss-1.0.0/bin/csscss:3
    from /usr/bin/csscss:23:in `load'
    from /usr/bin/csscss:23

@zmoazeni
Copy link
Owner

@nilsborchers Let's move this conversation to #11. In fact this comment might be helpful to you.

@nilsborg
Copy link

@zmoazeni ahh thx you're right i had to uninstall the 1.8 gem and reinstall with the new gem bin :)
thx! 👏

@kevboutin
Copy link

@nilsborchers How did you uninstall the 1.8 gem after installing 1.9?

@zmoazeni
Copy link
Owner

@kevboutin Can we keep 1.8 vs 1.9 issues in #11? You can tag him in that thread as well.

@zmoazeni
Copy link
Owner

@ahmedelgabri Ok a couple fixes just hit master and will be released in the next version (after v1.0.0)

I would prefer if the debug feature is a flag something like --debug or --debug=true instead cause when I wrote this csscss --help it didn't say anything about how can I turn debug on.

This is now --show-parser-errors

Had a problem parsing the css at line: 1, column: 1 ...The problem actually was at line 1964.

This is fixed in master too. I can't be 100% accurate but at least it's closer than the useless "line: 1, column: 1" all the time.

I'm going to close this issue and reopen a different one that is solely about line numbers.

@ahmedelgabri
Copy link
Author

@zmoazeni This is great, Looking forward for the new release. 

On Fri, Apr 12, 2013 at 7:52, Zach Moazeni <notifications@github.com="mailto:notifications@github.com">> wrote:
@ahmedelgabri Ok a couple fixes just hit master and will be released in the next version (after v1.0.0)

I would prefer if the debug feature is a flag something like --debug or --debug=true instead cause when I wrote this csscss --help it didn't say anything about how can I turn debug on.

This is now --show-parser-errors

Had a problem parsing the css at line: 1, column: 1 ...The problem actually was at line 1964.

This is fixed in master too. I can't be 100% accurate but at least it's closer than the useless "line: 1, column: 1" all the time.

I'm going to close this issue and reopen a different one that is solely about line numbers.


Reply to this email directly or view it on GitHub.

@zmoazeni
Copy link
Owner

All set in v1.1.0.

Sent from my iPhone

On Apr 12, 2013, at 2:15 AM, Ahmed El Gabri notifications@github.com wrote:

@zmoazeni This is great, Looking forward for the new release.

On Fri, Apr 12, 2013 at 7:52, Zach Moazeni <notifications@github.com="mailto:notifications@github.com">> wrote:
@ahmedelgabri Ok a couple fixes just hit master and will be released in the next version (after v1.0.0)

I would prefer if the debug feature is a flag something like --debug or --debug=true instead cause when I wrote this csscss --help it didn't say anything about how can I turn debug on.

This is now --show-parser-errors

Had a problem parsing the css at line: 1, column: 1 ...The problem actually was at line 1964.

This is fixed in master too. I can't be 100% accurate but at least it's closer than the useless "line: 1, column: 1" all the time.

I'm going to close this issue and reopen a different one that is solely about line numbers.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants