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

watch usage unclear or broken #1958

Closed
tcurdt opened this issue Jan 6, 2016 · 9 comments
Closed

watch usage unclear or broken #1958

tcurdt opened this issue Jan 6, 2016 · 9 comments

Comments

@tcurdt
Copy link

tcurdt commented Jan 6, 2016

This works:

$ sass -v
Sass 3.4.20 (Selective Steve)
$ sass index.scss index.css

Watching does not:

$ sass -h
    --watch                      Watch files or directories for changes.
                                 The location of the generated CSS can be set using a colon:
                                   sass --watch input.sass:output.css

$ sass --watch index.scss:index.css
>>> Sass is watching for changes. Press Ctrl-C to stop.
I, [2016-01-06T18:21:57.699128 #61495]  INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
ArgumentError: wrong number of arguments (2 for 1)
Use --trace for backtrace.

Here is the backtrace:

/Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/calls.rb:48:in `check': wrong number of arguments (2 for 1) (ArgumentError)
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/calls.rb:26:in `dispatch'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/call/sync.rb:16:in `dispatch'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/cell.rb:50:in `block in dispatch'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/cell.rb:76:in `block in task'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/actor.rb:339:in `block in task'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/task.rb:44:in `block in initialize'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/task/fibered.rb:14:in `block in create'
  from (celluloid):0:in `remote procedure call'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/call/sync.rb:45:in `value'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-0.17.2/lib/celluloid/proxy/sync.rb:38:in `method_missing'
  from /Users/user/.gem/ruby/2.2.3/gems/listen-2.7.12/lib/listen/listener.rb:206:in `_init_actors'
  from /Users/user/.gem/ruby/2.2.3/gems/listen-2.7.12/lib/listen/listener.rb:87:in `block in <class:Listener>'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:176:in `instance_eval'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:176:in `call'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:129:in `transition_with_callbacks!'
  from /Users/user/.gem/ruby/2.2.3/gems/celluloid-fsm-0.20.5/lib/celluloid/fsm.rb:97:in `transition'
  from /Users/user/.gem/ruby/2.2.3/gems/listen-2.7.12/lib/listen/listener.rb:100:in `start'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/plugin/compiler.rb:402:in `block in listen_to'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/plugin/compiler.rb:402:in `map'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/plugin/compiler.rb:402:in `listen_to'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/plugin/compiler.rb:338:in `watch'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/plugin.rb:108:in `method_missing'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/exec/sass_scss.rb:381:in `watch_or_update'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/exec/sass_scss.rb:51:in `process_result'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/exec/base.rb:52:in `parse'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/lib/sass/exec/base.rb:19:in `parse!'
  from /Users/user/.gem/ruby/2.2.3/gems/sass-3.4.20/bin/sass:13:in `<top (required)>'
  from /Users/user/.gem/ruby/2.2.3/bin/sass:23:in `load'
  from /Users/user/.gem/ruby/2.2.3/bin/sass:23:in `<main>'
@chriseppstein
Copy link

Please update your listen gem. Using version 2.10.1 it works fine.

@tcurdt
Copy link
Author

tcurdt commented Jan 6, 2016

@chriseppstein not here

$ gem install listen
Successfully installed listen-3.0.5
1 gem installed
$ sass --watch index.scss:index.css
>>> Sass is watching for changes. Press Ctrl-C to stop.
I, [2016-01-06T21:50:26.011129 #61745]  INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
ArgumentError: wrong number of arguments (2 for 1)
  Use --trace for backtrace.
@tcurdt
Copy link
Author

tcurdt commented Jan 6, 2016

Does it require a listen 2.x then?

@tcurdt
Copy link
Author

tcurdt commented Jan 6, 2016

Hm. I had a version 2.7.x - that didn't work. 3.x doesn't work either. 2.10.1 is rather old - what am I missing?

@tcurdt
Copy link
Author

tcurdt commented Jan 6, 2016

This is what I was missing https://github.com/sass/sass/tree/stable/vendor
Removing the installed (and newer) gem versions let it fall back to the vendored version.
Wow - that sucks. But at least it works now.

@chriseppstein
Copy link

We will happily support as many versions of the listen gem as we can, I was trying to give you a work around in the short term. Please file a new issue with steps to reproduce the issue with a particular version of listen.

@tcurdt
Copy link
Author

tcurdt commented Jan 7, 2016

@chriseppstein looks like all from 2.7.x on upwords should be broken
Just installing the latest listen gem should be enough to reproduce it.

Maybe the easier way would be to have sass really be a script that calls bundle exec? Obviously there are many incompatibilities between the listen versions. So supporting all does not really sound like the best path forward.

@chriseppstein
Copy link

If people are using bundler then they should call bundle exec sass.

We don't have a hard dependency on listen because there are lots of dependencies in the newer versions and we don't want people to have to install those especially since they are not necessarily using the command line.

Ideally, we'd break the CLI into it's own gem with it's own dependencies and keep it separate from the core compiler. Then we'd make the cli gem have a strong dependency on the listen gem and things would Just Work™.

@tcurdt
Copy link
Author

tcurdt commented Jan 7, 2016

bundle exec sass does not really work for CLI commands out of the box. Bundler needs to find the Gemfile. You would have to wrap it in shell script to make it convenient. And you also don't want to leave users with dependency hell by not using bundler either.

Bundler or not - the CLI gem path certainly is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants