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

Replace to_string compare with == object compare #2315

Closed
wants to merge 2 commits into from

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Feb 4, 2017

This a follow up for sass/sass#2229. This breaks a spec test which should hopefully be the same when sass/sass#2232 is released. There might be more cases where we use to_string to compare objects. This could lead to some regressions, as I think the compare functions do lack some edge cases. But we want them to surface, as we already use them in our hash map implementation. It is also faster than converting to a string before (specially if we can determine inequality early).

@mgreter
Copy link
Contributor Author

mgreter commented Feb 4, 2017

This has some unexpected failures in https://ci.appveyor.com/project/sass/libsass/build/1.0.3068/job/ih3by0c12b0fc0jv! Needs further investigations ...

@mgreter
Copy link
Contributor Author

mgreter commented Feb 4, 2017

Seems this is a bit too early. The failing spec test is is-superselector(':-moz-any(.foo, .bar)', ':-s-any(.foo, .bar)'); which crashes with a segfault, seems to indicate that we store some kind of selector inside those wrapped selectors. The compare operator doesn't seem to like it. Might be that we have some crude static cast lingering somewhere. The solution should be the same as in #2300

@mgreter mgreter force-pushed the fixup/object-compare branch 2 times, most recently from 404b591 to cc68f76 Compare February 4, 2017 12:18
@mgreter
Copy link
Contributor Author

mgreter commented Feb 4, 2017

It seems I was able to fix the issue. Not it is failing only the expected spec test.

@mgreter
Copy link
Contributor Author

mgreter commented Feb 4, 2017

Up on further review this needs some more changes as it is not equivalent to ruby sass now. There seems to be some path in unify_with that does not properly use the == operator.

@mgreter mgreter added the LibSass 3.6 Somewhere between Sass 3.5 and 4.0 label Mar 17, 2018
glebm added a commit to glebm/libsass that referenced this pull request Nov 18, 2018
glebm added a commit to glebm/libsass that referenced this pull request Nov 19, 2018
xzyfer pushed a commit that referenced this pull request Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant