You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We upgraded from 2.0.1 to 2.4.0 and ran into a strange issue with a Sassc process going into an infinite loop on one specific stylesheet. I stripped down the stylesheet to its bare minimum to have the following minimal repro:
require'sassc'sass=<<SCSS// Administrative buttons.btn { // Buttons with no extra styles &.-flat { border: none; &, &:hover { background: transparent; } }}//// UI Button Corrections// ---------------------// "New Topic" button.btn#create-topic { @extend .btn-secondary; @extend .btn.-no-icon;}// "Create Topic" button.btn.create,.btn.edit-category { @extend .btn.-no-icon;}// Button to load more topics on homepage.more-topics { .btn { @extend .btn.-small; }}// Topic footer buttons#topic-footer-buttons { > button { @extend .btn.-flat; } > .btn-primary { @extend .btn-secondary; }}// Notification options.notification-options { .btn { @extend .btn.-flat; }}// Extra post options.topic-map { .buttons { .btn { @extend .btn.-flat; } }}SCSSresult=SassC::Engine.new(sass,style: :compressed).renderputsresult.inspect
When I run the above, the process never completes and the CPU goes through the roof. Removing only the last @extend results in the following output:
Traceback (most recent call last):
2: from sass.rb:72:in `<main>'
1: from /Users/pmusaraj/.gem/ruby/2.6.5/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
stdin:34: Error: The target selector was not found. (SassC::SyntaxError)
Use "@extend .-small !optional" to avoid this error.
on line 34 of stdin
>> @extend .btn.-small;
Note that I am fully aware the SCSS syntax above is wrong, but shouldn't this return the error message at all times, no matter how many occurrences of the broken @extends are used?
The text was updated successfully, but these errors were encountered:
We upgraded from 2.0.1 to 2.4.0 and ran into a strange issue with a Sassc process going into an infinite loop on one specific stylesheet. I stripped down the stylesheet to its bare minimum to have the following minimal repro:
When I run the above, the process never completes and the CPU goes through the roof. Removing only the last @extend results in the following output:
Note that I am fully aware the SCSS syntax above is wrong, but shouldn't this return the error message at all times, no matter how many occurrences of the broken
@extend
s are used?The text was updated successfully, but these errors were encountered: