On 8/1/21 11:38 AM, Alain De Vos wrote:
>Dub has two big problems.
- Unmaintained dub stuff.
- Let's say you need bindings to postgresql library and you will see dub pulling in numerous of libraries, which have nothing at all to do with postgresql.
More like a framework stuff. This creates unneeded complexity, bloatware, dependency hell, maintainability, in my humble opinion. Dub should do one thing and do it good.
Feel free to elaborate.
My biggest pet peeve is when a library pulls in a unittest framework (which then might pull in all kinds of other things). I get it, and I get why it's needed as a non-optional dependency, but I have no intention on unittesting the library, I just want to use it. It's a shame to pull in everything that it needs because of that.
I recently added the dateparser project as a library. I found it was pulling in emsi-container, so it could have an array container (one line of code) that enables use of stdx.allocator. Ironically, the default (and all I cared about) is using the GC allocator. I wish there was a way to make this dependency optional. If more dub projects used optional dependencies, that would be nice.
Given the way D works, and often template-heavy coding styles, I think it's going to be hard to do this correctly, without careful attention and lots of version(has_xxx)
conditionals.
-Steve