guard/listen — Issue #5: Platform library dependencies
Author: thibaudgg
Created: 2012-01-30 14:26:14+00:00
State: open

Listen gem will depend on three main events library:

- rb-fsevent for Mac OS X
- rb-inotify for Linux
- rb-fchange for Windows

Adding specific platform dependencies in a gemspec isn't actually very pleasant ([more info](http://www.ruby-forum.com/topic/3473227)) and don't work well with Bundler (carlhuda/bundler#635). I'm not sure about [FSSM hack](https://github.com/ttilley/fssm/blob/master/ext/rakefile.rb#L7) (I haven't be able to make it work, and not sure how it will be handle by Bundler) and [vendorizing these three gems](https://github.com/guard/guard/blob/master/Rakefile#L7-49) like Guard is really a pain to maintain.

So there's a proposition. It seems to me that these three gems are installable (even if not usable) on each platforms (tested on OS X and Linux, with JRuby as well) so I propose that Listen always depends on them and only require the needed one (or none of them if polling is used).

I'm aware that isn't an ideal solution, but we can always change it when Bundler issue with specific platform gemspec is fixed.

What do you think about that? Do you have other (better) ideas?