Git, the D package manager
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 2 13:55:11 PST 2015
On Monday, February 02, 2015 22:37:13 Joseph Rushton Wakeling via Digitalmars-d wrote:
> On 02/02/15 15:40, Dicebot via Digitalmars-d wrote:
> > Quick summary of my opinion can look like this:
> >
> > 1) dub is a horrible build tool
> > 2) git submodules is a horrible way for dependency management
> >
> > First thing is something we can improve on in future and, actually, dub supports
> > using rdmd as a build tool already.
> >
> > Second thing is an inherent issue that won't change without some fundamental
> > breaking changes in how hit submodules are implemented.
> >
> > Because of that I am trying to push dub despite the fact I don't like lot of
> > things about it personally.
>
> Very well put. If there are issues with dub, we can and should address them --
> not turn to a tool that isn't actually intended to solve the problem we are
> trying to address.
I've long thought that it some point, dub would be forced to support
arbitrary build systems in order to actually work in the general case. There
are far too many special cases and more complicated things that build
scripts and the like frequently have to deal with for dub's simple approach
to work in many cases. Just look at what something like cmake it can do. It
blows dub out of the water when it comes to power.
The fact that we have package management via dub is great, and the way it
builds stuff works for many common cases (especially when you're talking
about libraries), but I really don't think that its build system is powerful
enough for the long run. I doubt that Sonke has time to deal with it given
how much is on his plate, but we really need to look at making it so that
dub supports a much more powerful build system - possibly even making it so
that it can support projects building with existing build systems such as
cmake. I'm sure that that sort of thing comes with its own types of
problems, but what dub does right now is just too simplistic.
A prime example that I've wondered about is how to deal with cases where you
need to create a C or C++ wrapper for something and use it in your project.
If dub supported makefiles, then that would be trivial, but as it stands, it
can't do anything even close to that. Anything that's C or C++ has to
already be built no the target system, be in a standard position for the
linker to find it, etc., or you can't use it in a dub project. Given our
need for C/C++ compatability, I think that that's a serious flaw. Dub is
new, and we've gotten by thus far with what it can do, but if it's going to
really be our standard build system for D, it needs to improve by quite a
bit.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list