Writing docs and unless I've missed something I think we have issues with our dependencies. We have a .gemspec as well as a Gemfile (this isn't the problem per say...).

The Gemfile is fine and lists dependencies comprehensively, including for all the external gems required to talk to the cloud providers (like 'aws', 'cloudfiles' etc). If you are setting up a dev environment and building the gem, you can use 'bundle install --system' and you get everything. All good.

However, the .gemspec only lists dependencies for the gems required to run the deltacloud server (like 'sinatra', 'thin' etc). This means that if you are just looking to download/use deltacloud and do a 'sudo gem install deltacloud-core' you don't get the gems for talking to the cloud providers. This will mean that 'deltacloudd -i ec2' gives a scary error message about missing stuff. Not good for someone just trying out deltacloud to see if its worth looking into.

Resolutions:

A) Add Gemfile dependencies to the .gemspec:

require 'bundler'
Gem::Specification.new do |s|
... (all the other dependencies and author, name etc)
s.add_bundler_dependencies

Problem with this approach is: 1) it adds a dependency for bundler, before you can build/install the gem (no biggie really since our gemspec already requires 'rake'). 2) 'add_bundler_dependencies' seems to have been deprecated https://github.com/carlhuda/bundler/issues/614 3) Gemfile has cloud provider dependencies in groups, and add_bundler_dependencies doesn't include those

B) Add a full list of dependencies to the .gemspec like here http://jeffkreeftmeijer.com/2010/lets-not-add_bundler_dependencies-anymore/ but then does that make Gemfile redundant?

I like B. What do other people think? Perhaps there isn't a problem? For example, we can augment the Download instructions with text along the lines of 'once you've installed deltacloud, you need to install gem X to talk to cloud provider Y' but I think thats really counterproductive - the whole point is to make getting and using deltacloud easy.

marios

Reply via email to