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

Segfault with @extends and :not #2017

Closed
xzyfer opened this issue Apr 21, 2016 · 3 comments
Closed

Segfault with @extends and :not #2017

xzyfer opened this issue Apr 21, 2016 · 3 comments

Comments

@xzyfer
Copy link
Contributor

xzyfer commented Apr 21, 2016

Originally reported by @dryoma in sass/node-sass#1465

foo {
  bar: baz;
}

@mixin link() {
  a:not(.btn) {
    color: red;
  }
}

foo {
  @include link;
  @extend .btn;
  @include link;
}

Ruby Sass

foo {
  bar: baz; }

foo a:not(.btn):not(foo) {
  color: red; }
foo a:not(.btn):not(foo) {
  color: red; }

LibSass 3.3.3+

[1]    51362 segmentation fault  /Users/michael/Projects/Sass/sassc/bin/sassc test.scss

LibSass 3.3.2

foo {
  bar: baz; }

foo a:not(.btn) {
  color: red; }

foo a:not(.btn) {
  color: red; }
@mgreter
Copy link
Contributor

mgreter commented Apr 21, 2016

I got Internal Error: deque::_M_new_elements_at_front on the first run (now getting segfault too)

@mgreter
Copy link
Contributor

mgreter commented Apr 21, 2016

The segfault was easy to fix as most of the time (another missing check).
It was triggered by a recent refactor of mine and the results look "promising".

libsass 3.5.5+

foo {
  bar: baz; }
foo a:not(.btn, foo) {
  color: red; }
foo a:not(.btn, foo) {
  color: red; }

libsass 3.3.2 (sassmeister)

foo {
  bar: baz; }
foo a:not(.btn) {
  color: red; }
foo a:not(.btn) {
  color: red; }

expected

foo {
  bar: baz; }
foo a:not(.btn):not(foo) {
  color: red; }
foo a:not(.btn):not(foo) {
  color: red; }

So it was silently dropping the :not(foo) selector, which means it could potentially break the expected css (if compared to ruby sass). Therefore I consider the now invalid css that is output more accurate, since it basically also shows that we now have the right selectors, but not in the correct form yet. And I'm pretty sure that is a duplicate of #1960. I guess we simply need to expand wrapped selectors that contain a list (maybe restricted to some specific type).

@mgreter
Copy link
Contributor

mgreter commented Apr 22, 2016

Continued in #2031

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

2 participants