A Plea to Reduce Dependences (e.g., for swig)

M.E. O'Neill oneill at cs.hmc.edu
Tue Aug 16 15:08:31 PDT 2011


Daniel J. Luke wrote:
>> see https://trac.macports.org/wiki/FAQ#ownlibs

... and Dan Ports replied:
> FWIW, I find that FAQ answer really unsatisfying. I agree that there are good reasons why MacPorts uses its own libraries, but the claim that "the drawbacks of this policy are minimal" just seems wrong. There are certainly cases where installing some port pulls in many more dependencies than you'd expect, and this has been a frequent complaint.
> 
> It may well be true that we are, on the whole, better off for building these dependencies, but we shouldn't dismiss the cost of doing so.

Right.

I summarized my feelings about swig's dependencies with this diagram:

	http://i.imgur.com/S6vyf.png

I'm not necessarily saying that it's bad to link to MacPorts-specific libraries, but it strikes me as highly questionable that someone wanting to use swig to make interfaces for Java programs needs to install an X server and a full install of python and perl and a variety of other software that is has no connection whatsoever to this task.  

Similarly, some ports pull in things that really really make no sense.  At all.  My favorite is GHC, which includes a dependency on perl5.8. Yes, 5.8. Why?  Because GHC uses perl in its build system.  The system perl works fine, but hey, MacPorts will install an ancient perl just 'cos.

And yes, I think the FAQ is far too dismissive of how much of an issue it is to pull in a hundreds of megabytes of other libraries. If MacPorts didn't have a propensity to compile everything from source, it might be one thing to make people install vast libraries of software they have no actual need of.  But compilation does take time.  There is a huge difference in usability between "I need swig [...five minutes pass...] I have swig, yay!" and "I need swig [...hours pass...] I guess it's installing libxml now, I wonder when it'll be done...?"  Plus, ports break, and so you run the risk of "I can't install swig because freetype won't build today. Argh!".

Likewise, while diskspace is often cheap, the equation isn't so simple as you may think.  If you have a MacBook Air with a 64 GB SSD, you may be watching you disk space usage carefully.  Similarly, megabytes do matter when some people need to pay for bandwidth (e.g., over a 3G connection).

    M.E.O.

P.S.  FWIW, there's alternate version of the diagram here: http://i.imgur.com/WUqBs.png



More information about the macports-dev mailing list