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

cl-css enters infinite recursion on a rule without body #4

Closed
orivej opened this issue Dec 11, 2013 · 3 comments
Closed

cl-css enters infinite recursion on a rule without body #4

orivej opened this issue Dec 11, 2013 · 3 comments

Comments

@orivej
Copy link

orivej commented Dec 11, 2013

This enters infinite recursion: (cl-css:css '((body)))
Noticed it on ("#table-players li .hand-size") in deal-ui/css.lisp.
Fix the loop in format-declarations-list in cl-css.lisplike this:

        if (consp head) collect (format-rule (car head) (cdr head))
        else if head collect (format-declaration head (pop remaining))
@inaimathi
Copy link
Owner

Pardon the delay.

I can't repro this with the latest version of cl-css. On my local, (cl-css:css '((body))) evaluates to

"body { }
"

Any ideas?

@orivej
Copy link
Author

orivej commented Dec 12, 2013

I might guess that your local copy is different from the latest commited version.
Here is a beginning of the traceback:

cl-css> (trace format-declarations-list format-rule format-declaration)
(format-declarations-list format-rule format-declaration)
cl-css> (css '((body)))
  0: (format-rule body nil)
    1: (format-declarations-list nil)
      2: (format-rule nil nil)
        3: (format-declarations-list nil)
          4: (format-rule nil nil)

@inaimathi
Copy link
Owner

You are correct; I had a stale install of an older version of cl-css.

Confirmed that this caused an infinite recursion, and that your suggestion fixes it.

The patch has been committed, and the ASDF package has been updated.

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