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

Remove conditions from gem declarations in Gemfile #584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

larskanis
Copy link

@larskanis larskanis commented Aug 5, 2024

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.

Gemfile Show resolved Hide resolved
@LouisaNikita
Copy link

LouisaNikita commented Aug 5, 2024 via email

@larskanis
Copy link
Author

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants