From: gabriele renzi Date: 2005-05-23T16:30:25+09:00 Subject: Re: Gem Dependancies Jeremy Hinegardner ha scritto: > On Mon, May 23, 2005 at 10:24:27AM +0900, James Edward Gray II wrote: > >>On May 22, 2005, at 7:12 PM, Jim Weirich wrote: >> >> >>>On Sunday 22 May 2005 01:27 pm, James Edward Gray II wrote: >>> >>> >>>>With HighLine, we've recently moved over to using termios... on Unix >>>>only. I set it up as a gem dependancy and this is causing problems >>>>with the Window's install (and we don't even need it on that >>>>platform). That leads me to the following questions: >>>> >>>>1. Is it possible to change dependancies based on the platform? >>>> >>> >>>Not within a single gem. You could provide separate gems with >>>different >>>dependencies. >> >>Do a few projects do this? Can you point me toward an example project? >> >>Is this on the RubyGems feature request list? If not, can I put it >>there? :) > > > I'll add to it too... > > I'm looking at a need for 'optional' dependencies. That is, given a > list of dependencies, at least one of them must be installed for the gem > to work. I think this are called "virtual" more than optional. I definitely agree this is needed, but I also see the need for "optional" gems (which AFAICT are not there, though I may be wrong). Say, actioncontroller has an utility method that rely on RedCloth. Putting the whole RedCloth as a dependency would be an overkill, but telling the user they *could* cooperate would be needed imho.