GNOME Bugzilla – Bug 742421
css parser is broken possibly due to scss api changes
Last modified: 2015-04-15 19:06:41 UTC
Seeing a lot of this when trying to initialize the CSS backend. 2015/01/05 14:01:28.2600 starfield: code-assistant[3310]: WARNING: GDBus.Error:org.freedesktop.DBus.Error.Failed: wrong number of arguments (2 for 3..5) from /usr/share/gems/gems/sass-3.3.8/lib/sass/scss/parser.rb:25:in `initialize' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/css/app.rb:73:in `new' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/css/app.rb:73:in `parse' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/transport/dbus.rb:92:in `block (2 levels) in <module:Service>' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/export.rb:81:in `call' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/export.rb:81:in `dispatch' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/transport/dbus.rb:310:in `dispatch' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/bus.rb:659:in `process' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/bus.rb:855:in `block in run' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/bus.rb:846:in `each' from /usr/share/gems/gems/ruby-dbus-0.9.0/lib/dbus/bus.rb:846:in `run' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/transport/dbus.rb:316:in `run' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/transport/dbus.rb:338:in `run' from /usr/libexec/gnome-code-assistance/backends/rb/gnome/codeassistance/css/app.rb:94:in `run' from /usr/libexec/gnome-code-assistance/css:6:in `<main>' Patch coming.
Created attachment 293880 [details] [review] css: fix css backend for scss api changes. We need to specify an importer for the parser classes now. I suspect this changed upstream at somepoint and nobody knew about it. Trivial fix, however we might consider using a project path to determine where the top of the CSS imports should be.
Thanks for the fix! I've pushed it plus some additional fixes. The reason it took me a bit longer is because I wanted to check when the signature of the Parser class was changed. If sass is not found on the system, we distribute our own vendored version of sass (since installing the sass gem from package for distros can be hairy). The version we were distributing was too old and needed to be updated as well. Finally, I've added version checks for sass so when sass on the system is too old, we use the vendored one.
Looks like we forgot to close. Marking fixed.