On Tuesday, 26 April 2022 at 01:21:58 UTC, Mike Parker wrote:
> On Monday, 25 April 2022 at 20:12:19 UTC, deadalnix wrote:
> The least power for the job definitively implies not inserting a build system in the package manager.
I'm posting in reply to deadalnix, but my comments are not directed at him specifically.
dub exists because it filled a huge, gaping hole in the D ecosystem.
Go back far enough and you'll find "build", later renamed "bud", by Derek Parnell. This was the first D build tool the community rallied around. Several D users adopted it.
https://www.digitalmars.com/d/archives/digitalmars/D/40914.html
Gregor Richards wasn't happy with bud, so he created "Rebuild" as an alternative build tool, but added a package manager on top of it called "DSSS" (D Shared Software System). Rebuild actually parsed source files looking for custom pragmas, and IIRC DSSS could install packages from multiple locations (svn, git, etc). Several D libraries users adopted it.
https://forum.dlang.org/thread/f06hsi$ng1$2@digitalmars.com
So let me tell you, this sounds but it was also a serious PITA as a library maintainer. You had the bud crowd demanding support for bud, the dsss crowd demanding support for dsss, and the crowd who refused to use either because make was good enough. At one point I had three platform-specific make files, a dsss.conf
, and a forbud.txt
(I eventually replaced some of that with a buildme.d file
).
There was no standard way of building D projects, and it sucked. Then Derek and Gregor disappeared, and suddenly these build systems everyone is using are no longer supported. No one takes them over, so we're in the Dark Ages again. Then dub comes along and saves the day.
It caught on quickly. Then people start thinking: "What happens if Sönke disappears? This should be an official D thing." So dub gets added to the installation. And here we are.
Without dub, we would not have the ecosystem that we do have. Personally, I love it. It makes using dependencies a snap. I'm happy with the default source tree expectations, and I don't mind compiling C libraries separately when I need them.
But I understand that no everyone is going to be happy with it (I don't understand the level of hatred some people direct at it, but I just chalk it up as "they aren't happy with it" and move on).
The question is, what exactly is dub missing and how can it be improved? Which perceived shortcomings are reasonable to address and which are not? And assuming we can answer those questions, who is going to address them?
dub misses a good tutorial and good example files for different scenarios. I tried to integrate it in my C project (granted, which is very oddly structured). I managed to get quite far but the issue was that I had to check a lot of projects on github to see examples of different options. One thing for example I didn't manage to get to work correctly was to specify separate directory for the object files (in the C project we have debug and optimized builds and to avoid rebuilding each time, the .o
files are in their own directory). dub always put them where it did the linking. I'm sure dub allows to set it up somehow but the documentation is very unclear on that.