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

[WIP] Use local docker containers instead of Sassmeister #36

Merged
merged 7 commits into from Apr 20, 2015

Conversation

Projects
None yet
4 participants
@xzyfer
Contributor

xzyfer commented Apr 15, 2015

This PR replaces the Sassmeister dependencies with docker containers that run locally. Since docker containers are self contained environments running multiple versions of Ruby Sass is easy.

One caveat is that I couldn't get the async runner working with boot2docker so Rake now runs synchronously. This makes Rake run slower but since it only needs to be run infrequently it felt like a good trade for having this site working again.

I've also added data for Libsass 3.2.0-beta.5 but I completely understand if you want it removed. Since 3.1.0 has been widely adopted it make sense to keep it around even after 3.2.0 is stable.

TODO

  • update setup documentation
  • clean up remnants of async code
  • handle specs where error is a success condition
  • update support and stats for the latest sass spec

Testing it out

To test this out you need to install VirtualBox.

You'll also need docker and boot2docker. I recommend using brew on OSX.

brew install docker boot2docker
boot2docker init
boot2docker up

Then just run it as usual

bundle install
bundle exec rake clean default

Update
I was able to get parallelisms working again. However after some benchmarking it turns out (atleast on my machine) the tests run faster without it. I expect this is due to the resource contention of the host VM. I expect this can be tweaked but IMO sticking with the defaults is the way to go for the sake of simplicity.

Make tests run synchronously
Unfortuantely boot2docker has issues when parallelized

@xzyfer xzyfer force-pushed the xzyfer:feat/dockerize branch from 8181c66 to e3d6fc2 Apr 15, 2015

Rakefile Outdated
#
DOCKER_ENGINES.each { |engine, release|
unless ENGINE_EXEC[engine]
prefix = `boot2docker shellinit`.split(' ').values_at(1, 3, 5).join(' ')

This comment has been minimized.

@HugoGiraudel

HugoGiraudel Apr 15, 2015

Contributor

What exactly are you doing here?

This comment has been minimized.

@xzyfer

xzyfer Apr 15, 2015

Contributor

Docker needs some environment variables to function correct. These variables are exposed via boot2docker shellinit.

In order to avoid polluting the user's environment I opted for prefixing all docker commands with the environment variables so they're only present for that process.

Here I'm executing boot2docker shellinit.

$ boot2docker shellinit
Writing /Users/michael/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/michael/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/michael/.boot2docker/certs/boot2docker-vm/key.pem
    export DOCKER_CERT_PATH=/Users/michael/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1
    export DOCKER_HOST=tcp://192.168.59.103:2376

Then parsing the output, and building the prefix string.

prefix = "DOCKER_HOST=tcp://192.168.59.103:2376 DOCKER_CERT_PATH=/Users/michael/.boot2docker/certs/boot2docker-vm DOCKER_TLS_VERIFY=1"

This value unfortunately cannot be hardcoded as it's dependant on factors we can't know.

This comment has been minimized.

@xzyfer

xzyfer Apr 15, 2015

Contributor

It's not pretty because I don't Ruby well

Rakefile Outdated
unless $?.exitstatus > 0
File.write t.name, result.clean
else
STDERR.puts " error occured with #{input} for #{engine}"

This comment has been minimized.

@HugoGiraudel

HugoGiraudel Apr 15, 2015

Contributor

This causes an issue with cross-@media extends because in this specific case, no support is what is actually expected. Any idea how we could fix it?

This comment has been minimized.

@xzyfer

xzyfer Apr 15, 2015

Contributor

You're correct. This is currently failing 4 tests include the error directive test. Using docker actually makes it's trivial to capture the error output so this can be easily dealt with.

This comment has been minimized.

@HugoGiraudel

HugoGiraudel Apr 15, 2015

Contributor

Very cool. I'll wait for your patch before merging then. :)

@xzyfer xzyfer force-pushed the xzyfer:feat/dockerize branch from fb9c5ab to 785e7ba Apr 16, 2015

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 18, 2015

Okay, let' s try this. :)

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 18, 2015

Current issue:

(270/340) Compiling tests/selector_manipulation_functions/input.scss for libsass_3_2
rake aborted!
ArgumentError: invalid byte sequence in UTF-8
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `[]'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `block in normalize_css'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `reject'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `normalize_css'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:89:in `clean'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:317:in `block (3 levels) in <top (required)>'
Tasks: TOP => default => _sass/utils/_stats.scss => _data/stats.yml => _data/support.yml => tests/selector_manipulation_functions/support.yml => tests/selector_manipulation_functions/output.libsass_3_2.css
(See full trace by running task with --trace)
@valeriangalliat

This comment has been minimized.

Contributor

valeriangalliat commented Apr 19, 2015

Hey @xzyfer, thanks for this PR, it's really nice to not have to depend on SassMeister API anymore!

Review

I've done a quick review/fixes here, the most important part being GNU/Linux compatibility (the only thing needed was to restrict the Boot2Docker invocation to Darwin platform). If you're okay with these changes, I suggest you add them to this very PR (with fast forward):

git remote add upstream https://github.com/sass-compatibility/sass-compatibility.github.io.git
git checkout feat/dockerize
git fetch upstream feat/dockerize
git merge --ff upstream/feat/dockerize

UTF-8

About @HugoGiraudel's UTF-8 issue, I have no problem on my side (running Arch Linux).

(269/340) Compiling tests/selector_manipulation_functions/input.scss for libsass_3_1
(270/340) Compiling tests/selector_manipulation_functions/input.scss for libsass_3_2
(271/340) Compiling spec/libsass-closed-issues/issue_578/input.scss for ruby_sass_3_2

Not sure about this, probably an encoding problem with Boot2Docker, VirtualBox or something?

Parallelism

This new verisons takes much longer to compile, because of the cost of running a container for each test and engine (340 * 5 right now, that is, 1700 container invocations). We could reduce this to just the number of engines by running a single container per engine.

I'm not sure how to do this with the current containers, @xzyfer, but I have a couple of ideas:

Pass all tests to the container

In the container, run a script looping over the non-up-to-date tests (passed as argument, instead of one single test), and writing the output files directly in the working directory (it wouldn't be the Rakefile's responsibility to do this anymore).

However we still have the clean method implemented in the Rakefile, so we would need another kind of temporary file; the container script would output a raw output and the Rakefile run clean over it.

I don't really like this idea since the parallelism needs to be implemented in the container script itself instead of a simple multitask in the Rakefile, and we also loose the target: prerequisites architecture that make the power of make-like tools.

Long-running containers

Keep a long-running Docker instance for each engine during the whole Rakefile execution, and pass it commands instead of booting it for every test.

About the way to pass messages between the Rakefile and the container, this needs to be compatible with parallelism, so a simple stdin/stdout would not be enough. Maybe a TCP service based on ncat?

# Server
ncat --listen --keep-open --sh-exec 'sleep 1; echo ok' 1337

# Client (send parallel requests)
for x in {1..100}; do ncat --recv-only localhost 1337 & done
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Hey @valeriangalliat thanks!

I've done a quick review/fixes

This is great thanks. My Ruby isn't great.

UTF-8

My gut feeling is that this is bug in Libsass in dealing with UTF-8 and system locales. Could be that you and myself have different locales/langauges to @HugoGiraudel.

1700 container invocations

This is true, however it's worth nothing that subsequent invocations of the same image is very fast. Still not ideal I agree.

We could reduce this to just the number of engines by running a single container per engine.

If I'm understanding you correctly I believe this is already the case.

Pass all tests to the container

This is the big improvement I had in mind. I frankly didn't feel comfortable making such large changes. We should run the entire test suite per engine (container), rather than running each test on each container sequentially.

Parallelism

We can also employ parallelism. I have disabled this this because the default boot2docker VM uses only one core and running the specs in parallel actually slowed it down.

This required more documentation and introduces barriers to users so I opted out. We could however enable parallelism and limit it to one core in the rake config (if that's possible). Then expose an ENV variable to change the parallelism count if you have a correctly configured VM.

this needs to be compatible with parallelism, so a simple stdin/stdout would not be enough

Honestly this is out of my wheel house. I defer to your judgement.

Thanks again!

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

My gut feeling is that this is bug in Libsass in dealing with UTF-8 and system locales. Could be that you and myself have different locales/langauges to @HugoGiraudel.

What should we do? :(

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

$ defaults read .GlobalPreferences AppleLanguages | tr -d [:space:] | cut -c2-3
> en
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

@HugoGiraudel if you're willing to, you could checkout the latest Libsass and run the sass-spec suite locally to see if you can reproduce the issue.

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

How can I do this?

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

It should be matter of checking out libsass master the running

./script/spec
@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

cd sassc && /Applications/Xcode.app/Contents/Developer/usr/bin/make
Makefile:131: *** SASS_LIBSASS_PATH must be defined.  Stop.
make: *** [sassc/bin/sassc] Error 2
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Ah ok, we should fix that. Try this?

SASS_SASSC_PATH=sassc SASS_SPEC_PATH=sass-spec SASS_SPEC_SPEC_DIR=spec ./script/spec
@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

SASS_SASSC_PATH=sassc SASS_SPEC_PATH=sass-spec SASS_SPEC_SPEC_DIR=spec ./script/spec

 _     ___ ____ ____    _    ____ ____
| |   |_ _| __ ) ___|  / \  / ___/ ___|
| |    | ||  _ \___ \ / _ \ \___ \___ \
| |___ | || |_) |__) / ___ \ ___) |__) |
|_____|___|____/____/_/   \_\____/____/

cd sassc && /Applications/Xcode.app/Contents/Developer/usr/bin/make
Makefile:131: *** SASS_LIBSASS_PATH must be defined.  Stop.
make: *** [sassc/bin/sassc] Error 2
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Ah my bad. SASS_LIBSASS_PATH needs to refer to the current working directory. Try

SASS_SASSC_PATH=sassc SASS_SPEC_PATH=sass-spec SASS_LIBSASS_PATH=$(pwd) ./script/spec
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

You can also export these ENV variables if you plan to work with sass-spec/libsass often. This would mean you can just run ./script/spec

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

SASS_SASSC_PATH=sassc SASS_SPEC_PATH=sass-spec SASS_LIBSASS_PATH=$(pwd) ./script/spec

 _     ___ ____ ____    _    ____ ____
| |   |_ _| __ ) ___|  / \  / ___/ ___|
| |    | ||  _ \___ \ / _ \ \___ \___ \
| |___ | || |_) |__) / ___ \ ___) |__) |
|_____|___|____/____/_/   \_\____/____/

cd sassc && /Applications/Xcode.app/Contents/Developer/usr/bin/make
BUILD="static" /Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/administrateur/Documents/projects/libsass
make[2]: Nothing to be done for `all'.
cc -c -Wall -O2 -DSASSC_VERSION="\"3.2.0-beta.5\"" -I /Users/administrateur/Documents/projects/libsass -stdlib=libc++ -fPIC sassc.c -o sassc.o
cc -Wall -O2 -std=c++0x -stdlib=libc++ -ldl -fPIC -o bin/sassc sassc.o /Users/administrateur/Documents/projects/libsass/lib/libsass.a -lstdc++ -lm -ldl
ruby sass-spec/sass-spec.rb -c sassc/bin/sassc -s --ignore-todo  sass-spec/spec
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- minitest (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/administrateur/Documents/projects/libsass/sass-spec/lib/sass_spec/runner.rb:1:in `<top (required)>'
    from /Users/administrateur/Documents/projects/libsass/sass-spec/lib/sass_spec.rb:4:in `require_relative'
    from /Users/administrateur/Documents/projects/libsass/sass-spec/lib/sass_spec.rb:4:in `<top (required)>'
    from sass-spec/sass-spec.rb:22:in `require_relative'
    from sass-spec/sass-spec.rb:22:in `<main>'
make: *** [test_build] Error 1
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Oh. You'll need to bundle install sass-spec. Run this (cd sass-spec && bundle)

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

SASS_SASSC_PATH=sassc SASS_SPEC_PATH=sass-spec SASS_LIBSASS_PATH=$(pwd) ./script/spec

 _     ___ ____ ____    _    ____ ____
| |   |_ _| __ ) ___|  / \  / ___/ ___|
| |    | ||  _ \___ \ / _ \ \___ \___ \
| |___ | || |_) |__) / ___ \ ___) |__) |
|_____|___|____/____/_/   \_\____/____/

cd sassc && /Applications/Xcode.app/Contents/Developer/usr/bin/make
BUILD="static" /Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/administrateur/Documents/projects/libsass
make[2]: Nothing to be done for `all'.
cc -Wall -O2 -std=c++0x -stdlib=libc++ -ldl -fPIC -o bin/sassc sassc.o /Users/administrateur/Documents/projects/libsass/lib/libsass.a -lstdc++ -lm -ldl
ruby sass-spec/sass-spec.rb -c sassc/bin/sassc -s --ignore-todo  sass-spec/spec
Recursively searching under directory 'sass-spec/spec' for test files to test 'sassc/bin/sassc' with.
sassc: 3.2.0-beta.5
libsass: 3.2.0-beta.5-39-gc68b
sass2scss: 1.0.3
Run options: --seed 11357

# Running:

S...S.S.SSSS............S.......S..S.....................S......S............S..S....SS................S................S............S........S.........S..S....S......S.......S.S...S.....S...S...S..................................SS.......S.............S.S.......S...............................SSS......S.....S.S...................S.S....S.......S............S.......................................S....S..........S...........S..S.....SSS.S.............................S.............S................................S...S.....S....S............S.S.........S.............S..............SSS............S.......S..S...........S.....................SS.S.S..........S......SSS.....S...S..............S...................S..S..S...................S........S...S................S....S..S......................S...............SSS...........S....SS........S........SS.......................S..........................S.SS......S..............S.S....S.......................S.S........S....................S.........S.............S.........S.................S..S.....S....S.........S..S....S...S..SS.S.....S..S...S.....S...........S....S...SS...............SSSS............S....S.............S....................S......S..........S...........S.............S.........S........S.....................SS........SS...SS...S..........S..........S..S.........S...S.........S..S.......................S..S.............................................SS........S....................S.......S...S..S..............................S....S.S.............S..SS..S..S......S.....S.S...............S.....................SS...............S..........S.................S..........SSS....S.................S....S....S.....S......S..S.S..S....S..S....S.S.......S.....S.....S....SS.SS..........S.S.S............S.........S..S..........S..S..................................S......S.............S...................S.........S..........S...S....S.S..S.S..S...........S...S....S.........S.................S..........SS.........S.............S..S....S....S.....S.S...S.S............S......................S..S..S......S..S........S...S.......S..SS...........................S..S.....S..S....S.......S...S..SS.......................S............S.....................S.......S........S..S...S...........................S..........SS........S..S..S...........S......................S.S...S......S.....S.....................S..........S.....S.......S............S..S.........................S......SS.S........S...S.........S.........S......S....S...S......S................S..S..........S........S.......S..............S....S........S........S....S.............S......S........S....S......S.......S.......S......S...S...S..........SS.......S..........S...........S.............S.....S.........S..................S....S..........S..SS....S....S..........S......................S...................S...SS..S..S...........S..S...............S.........S......SS......S......S........S.....S.....S....S....S........SS.....................S......S....S......S........................S.............S........S........S.S......SS..S.S......S........S........S....................S........S..S...............S.....S.S....S..S..S..............................S.................S..S...S...............S......S.S.................S...................S....SS........S...S...................S...S...............S.....SS......S..........S...S......SS...S.S....S......S..............S.........S..S....S....SS......S..S..S......SS...........SS...S...S....S............S.....S.S.S.S......S......S...........S.....S......S..............S.S..S.......SS.S..SS........S............S...........S..SSS...............................S.........................S......................S..........S.......S........S.......S...S..........S......................S...........S....S...S.........S............S.........S.S........S................S....S.....S..S.........S................S.S.........................S..........S...S.......S......................S...S......SS...........S................S.......S...S.....S...S.....S.....S.....S.....S........................S............................................SS.S.SS....SS...........................S.....SS............S....S...S....S.S...S..................S.SS...........S..S.........S....S.......S......S............S....S.SSS........S...S............................

Finished in 25.042464s, 174.0643 runs/s, 458.4613 assertions/s.

4359 runs, 11481 assertions, 0 failures, 0 errors, 532 skips

You have skipped tests. Run with --verbose for details.
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Ok wow, I'm at a loss then. I'll keep looking into it.

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

Erf.. If I can help.

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

If you could narrow down exactly which part of tests/selector_manipulation_functions/input.scss causes the issue that'd be great.

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

Problem does not come from:

#{selector-parse(".selector-parse")} {
  content: selector-parse;
}
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

It doesn't happen if that is removed?

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

Problem does not come from:

#{simple-selectors(".simple.selectors")} {
  content: simple-selectors;
}
@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

Problem does not come from:

.is-superselector {
  content: is-superselector(".is-superselector", ".selector");
}
@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 19, 2015

Problem does not come from:

#{selector-unify(".selector", ".selector-unify")} {
  content: selector-unify;
}
@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 19, 2015

Sounds good
On 20 Apr 2015 01:42, "Hugo Giraudel" notifications@github.com wrote:

Shall I open an issue on LibSass?


Reply to this email directly or view it on GitHub
#36 (comment)
.

@valeriangalliat

This comment has been minimized.

Contributor

valeriangalliat commented Apr 19, 2015

My gut feeling is that this is bug in Libsass in dealing with UTF-8 and system locales. Could be that you and myself have different locales/langauges to @HugoGiraudel.

Nice point. My system is in en_US.UTF-8. I don't know about you and @HugoGiraudel?

Edit: seems this problem was moved to LibSass. Nevermind.

We could reduce this to just the number of engines by running a single container per engine.

If I'm understanding you correctly I believe this is already the case.

I meant running one container instance per engine (so, 5, not any more) and communicate in some way with the unique engine instance to avoid booting 1700 different containers (even if subsequent invocations are supposed to be fast, we saw there's problems to invoke them in a parallel way).

Pass all tests to the container

This is the big improvement I had in mind. I frankly didn't feel comfortable making such large changes. We should run the entire test suite per engine (container), rather than running each test on each container sequentially.

Anyway this solution have a few downsides as I highlighted in my previous post, and I don't think we should implement this. And as you said, this would require many changes in the code.

Parallelism

We can also employ parallelism. I have disabled this this because the default boot2docker VM uses only one core and running the specs in parallel actually slowed it down.

I don't mean to run Docker containers in parallel, but to communicate with a unique Docker instance (one per engine) in a parallel way. This is way more lightweight, and we avoid all this VM configuration stuff on OS X to actually gain performance.


I'd like to try the TCP service I had in mind for Sass compilation inside Docker containers. However I'm not really confident with Docker, so I have a few questions for you, @xzyfer:

  • I need the socat package in your containers, what's the best way to do this? I think I need to create 5 directories in this repo (one per engine), with a Dockerfile like this (for Ruby Sass 3.4):

    FROM xzyfer/docker-ruby-sass:3.4
    RUN apk add --update socat && rm -rf /var/cache/apk
    ENTRYPOINT ["socat", "-t", "10", "TCP-LISTEN:1337,reuseaddr,fork", "SYSTEM:sass --no-cache"]

    And then use these containers from the Rakefile instead of directly your ones. But can I just tell docker run to use ./docker/ruby-sass-3.4 instead of xzyfer/docker-ruby-sass:3.4? If not, what are my options?

    Also, is there a way to inherit your tags for my custom Dockerfiles so I can just create 2 (one for Ruby Sass and the other for LibSass)?

    Additionnally, you see the SYSTEM: command above is the one from your original ENTRYPOINT. It's really a detail, but do you think there is a way to dynamically get the parent Dockerfile's entrypoint as a variable when defining my own entrypoint?

  • To communicate with the container from the Rakefile, I plan to add -p xxxx:1337 (where xxxx is a different port) so these ports are bound to localhost, and from the Rakefile I can just connect to localhost:xxxx. What do you think of this idea? Is there a better way, or any kind of best practices about this?

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

Ok I've been able to make some progress here.

The Error: unterminated argument to selector-nest(...) error is due to selector-nest being undefined in Libsass. This results in Sass fallback behaviour of printing out the function call instead. Later on in Libsass we reparse some selectors at which point the parser explodes with an unhelpful message. This only happens under a couple circumstances one of which is multiple arguments to be function call i.e.

#{foo("bar", "baz")} {
  content: "foo";
}

Ruby Sass also errors here but with a better message

Error: Invalid CSS after "foo": expected selector, was "("bar", "baz")"

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

I've taken closer look at the stack trace @HugoGiraudel (now that it's day light) and I think I know what's happening.

(270/340) Compiling tests/selector_manipulation_functions/input.scss for libsass_3_2
rake aborted!
ArgumentError: invalid byte sequence in UTF-8
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `[]'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `block in normalize_css'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `reject'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:59:in `normalize_css'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:89:in `clean'
/Users/administrateur/Documents/projects/sass-compatibility.github.io/Rakefile:317:in `block (3 levels) in <top (required)>'
Tasks: TOP => default => _sass/utils/_stats.scss => _data/stats.yml => _data/support.yml => tests/selector_manipulation_functions/support.yml => tests/selector_manipulation_functions/output.libsass_3_2.css
(See full trace by running task with --trace)

The UTF-8 error here is actually being thrown in Ruby (Rake) not Libasss. I believe it's due to the garbage characters in the error message.

Error: unterminated argument to selector-nest(...)
        on line 1 of tests/selector_manipulation_functions/input.scss
>> �$4��
   --------------^

I would appear that I need to make the Rake file more resilient. Also we need to stop Libsass producing garbage.

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

More specifically it's the normalize_css function I added which is chocking.

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 20, 2015

What kind of garbage characters?

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

�$4��
@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 20, 2015

How is this even possible that LibSass produces those kind of characters (not on purpose I mean)?

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

I'm not sure. It's due a recent refactor I believe. It's been reported before sass/libsass#1079

@xzyfer xzyfer force-pushed the xzyfer:feat/dockerize branch from 785e7ba to deb1104 Apr 20, 2015

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

I've applied patch @valeriangalliat suggested, and patched the ArgumentError.

@HugoGiraudel do you want to give this another shot?

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 20, 2015

Sure, tonight though. :)

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 20, 2015

No worries, I have pizza and Game of Thrones to get to now :)

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 20, 2015

What's left to do here @xzyfer, can we merge (after a rebase from your side)?

@HugoGiraudel HugoGiraudel merged commit deb1104 into sass-compatibility:master Apr 20, 2015

@HugoGiraudel

This comment has been minimized.

Contributor

HugoGiraudel commented Apr 20, 2015

I have merged it now that it works fine. Thank you very much for your work @xzyfer, we now have LibSass 3.2 beta stats on the site. :)

There are a few things left to do:

@HugoGiraudel HugoGiraudel referenced this pull request Apr 20, 2015

Closed

Speed up tests #38

@matiassingers

This comment has been minimized.

matiassingers commented Apr 21, 2015

This is really awesome guys, great work! 👍

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 21, 2015

@valeriangalliat the short answer to your questions is that I don't know. This PR is pretty utilises the full extent of my Docker and Ruby know-how :)

@valeriangalliat

This comment has been minimized.

Contributor

valeriangalliat commented Apr 21, 2015

Alright @xzyfer, I'll give a try to my ideas as is, and see if it works well. 😄

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Apr 21, 2015

I look forward to seeing what you come up with.

@xzyfer xzyfer deleted the xzyfer:feat/dockerize branch Apr 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment