guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.93k stars 247 forks source link

Remove conditions from gem declarations in Gemfile #584

Open larskanis opened 3 months ago

larskanis commented 3 months ago

Both gems 'wdm' and 'rb-kqueue' can be installed on any platform. They fail when require 'wdm' or 'rb-kqueue' is called. So the conditions in the Gemfile can be removed and should not be recommended.

Having conditions in the Gemfile is generally bad practice, since this leads to changed Gemfile.lock, whenever the bundler is executed on a different platform. Also bundle package --all-platforms doesn't work properly, when gems are declared conditionally.

LouisaNikita commented 3 months ago

我已收到你的邮件,谢谢!  

larskanis commented 3 months ago

In principle the gems could also be added to the listen.gemspec, like 'rb-fsevent' and 'rb-inotify'. But this would install them for all users of 'listen', although only a small subset needs them.