[Rubygems-developers] What is right and wrong with dependencies definitions?

Eric Hodel drbrain at segment7.net
Sat Nov 10 16:00:25 EST 2007

On Nov 9, 2007, at 20:09 , Luis Lavena wrote:
> On Nov 9, 2007 7:47 PM, Eric Hodel <drbrain at segment7.net> wrote:
>> Including everything is the best approach.
>> My conclusion is that people only want to bikeshed[1] about this
>> topic.  They don't want to define an actual solution.  When this
>> issue first came up (with hoe) people complained loudly, and I told
>> them that the best way to handle this would be "developer
>> dependencies".  It took eight months for the feature request to show
>> up on the tracker[2].  Two and a half months later, the requester
>> hasn't defined how they think developer dependencies are supposed to
>> work.
> Thanks for the bikeshed reference, I wasn't aware of the right term in
> english. :-)
> Please excuse the noise, I missed the discussion about this (maybe I
> joined the party too late) :-P

No, there hasn't been any discussion at all.

>> Things that need to be discussed are:
>> * should developer dependencies by installed by default?
>> * what does the command-line option look like?
>> * what happens on uninstall?
>> * what should `gem check` do if all dependencies aren't installed?
> I'm seeing this like apt-get build-dep command (and lot of users will
> argue this is not the best way) -- still, fits best:
> if you intent to build ruby1.8, you need to download the packages that
> are marked as dependencies for compilation/build:
> sudo apt-get build-dep ruby1.8
> Now, you can grab the source code for ruby1.8 and start the compile
> process (if you have the compiler installed, of course)
> I see the compile process as the 'rake compile test package' tasks  
> sequence.
> Uninstalling of the gem isn't related here, mostly since you're trying
> to build from source or perform some kind of check for the gem.

I think this is right.

> 'gem check' should only yell at you that not all the dependencies for
> testing/building are installed, and guide you to 'build-dep <gemname>'
> to correct the issue.

I think this is right.

> I must honestly say what I don't know what to do with orphaned gems,
> mostly since these gems could the useful for others or even the final
> user:
> - I manually install rspec for my own, personal use.
> - Try to do some work on DataMapper, which need rspec as build-dep
> - gem build-dep datamapper
> - rake test package (datamapper) and then gem install it.
> - Found it good, but just got bored of it (gem uninstall datamapper)
> - rspec shouldn't be removed... even if it's a build dependency of
> datamapper and there isn't another gem using it.

I think this is right.

>> Before attempting a patch, I think at least these questions should be
>> answered.  There are probably more, since getting it to work well
>> requires changes and hooks in lots of places.
> What about a proof of concept? maybe using some text field of the
> specification to track this... and create the fake build-dep command
> that use that information and manage the installation of dependencies?

Yes, it would help find problems, but there's also the problem of  
gems needing to be updated to work with the proof of concept (adding  
developer dependencies).  So it couldn't be reliably tested without  
input from the community.

>> Its really easy to say "gems should have developer dependencies".
>> Its a lot of work to make it a reality.
> Is easier say than do... "show me the code" often came after that  
> line ;-)


Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars

More information about the Rubygems-developers mailing list