sass / perl-libsass

Perl bindings for libsass (CSS::Sass)
MIT License
29 stars 15 forks source link

(CSS::Sass-3.4.9)does not work 'psass -w' under Strawberry Perl 5.22.2(32bit) on Windows 7. #33

Closed twata1 closed 6 years ago

twata1 commented 6 years ago

Hi, I will report an issue.

[Test environment] Windows 7 Pro(32bit) Strawberry Perl 5.22.2(32bit built for MSWin32-x86-multi-thread-64int)

[Test files and directory]

 c:\work\hello.psgi
 c:\work\aaa.txt
 c:\work\lib\a.txt
 c:\work\lib\abc\b.txt
 c:\work\sass\body.sass
 c:\work\css\body.css

[Test]

C:\work>perl -MCSS::Sass -e "print $CSS::Sass::VERSION;"
3.4.9
C:\work>perl -MList::MoreUtils -e "print $List::MoreUtils::VERSION"
0.426
C:\work>perl -MList::MoreUtils -e "print $List::MoreUtils::XS::VERSION"
0.426
C:\work>perl -MFile::Slurp -e "print $File::Slurp::VERSION;"
9999.19
C:\work>psass -v
psass 0.5.0 (perl sass/scss compiler)
  libsass: 3.4.7-gcc44
  sass2scss: 1.1.1

Regardless of whether or not to apply Filesys::Notify::Simple patch(https://github.com/miyagawa/Filesys-Notify-Simple/pull/23), when I execute a command as follows:

C:\work>psass -w .\sass\body.sass .\css\body.css

Perl crashes(The message like "Perl Interpreter has stopped working" window shows).

Thank you,

mgreter commented 6 years ago

This is unfortunately a bug with that perl version and Encode. You can trigger the bug with the following simple script:

use Encode::Locale qw();
binmode(STDOUT, ":encoding(console_out)");
fork();

I might be able to come up with a (dirty) workaround. Similar (IMO the same) issue: https://github.com/tokuhirom/Test-Pretty/issues/26.

mgreter commented 6 years ago

Added a workaround in https://github.com/sass/perl-libsass/commit/f3dbfc2e1f2b03438cd4eca0dd135e64f79b1a7a

twata1 commented 6 years ago

Certainly, I could trigger the bug with the previous script:

use Encode::Locale qw(); binmode(STDOUT, ":encoding(console_out)"); fork();

I learned a lot. Thank you!!!