Closed athityakumar closed 7 years ago
From my perspective:
module Daru
module Importers
class CSV < Base
required_gem 'smartcsv', '~> 2.5'
optional_gem 'fastcsv', '~> 3'
I like the idea of being able to install dependencies in one go. You can have groups for individual wrappers and another one where all of them are installed together.
However, users will be using gem install
to install the library so the options that a user passes must work with that.
Daru-io has lots of format-specific dependencies that are used in just one importer / exporter. Having them all as optional dependencies is one way to go about it.
Optional dependencies aren't supported by Rubygem's gemspec file - so they will NOT feature in the gemspec file. So, what if any user wants to install ALL of the optional gems of daru-io at one go? In bundler's Gemfile, can all optional gems be included them under a group (say, optional)? That way, the normal user installs with
bundle install --without optional
and someone who wants all optional gems runs justbundle install
.Please share your thoughts on whether there is a better way to go about optional dependencies. 😃
Ping @zverok @v0dro @lokeshh