I just created a dub package. Frankly, the whole thign is backward.

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Tue Apr 26 19:06:50 UTC 2022


On Tuesday, 26 April 2022 at 18:14:20 UTC, H. S. Teoh wrote:
>
> Right, which brings me back to square one. Dub already knows 
> how to cache stuff, but I can't leverage any of it because it 
> was arbitrarily decided that dub would only work with D source 
> files, and therefore it only caches D artifacts.  If I want to 
> build HTML files from templates, for example, I couldn't 
> leverage dub's caching ability; I have to roll my own and 
> reinvent the square wheel.  If I want to build PNG files from 
> data files, I'd also have to roll my own cache.  Eventually, 
> I'd want to avoid reinventing my own cache for every artifact I 
> want to build, so I'd look for a system that offers me that 
> capability.  Such a system would obviously also be able to 
> build D programs and cache them as artifacts, since building D 
> programs would be a specific case of the more general task of 
> building a target from sources and caching it. Which in turn 
> means that dub has just become redundant: I might as well just 
> use that other system for *all* my build needs, including 
> building D programs, and it would let me do everything I need 
> without needing to work with two different, overlapping systems 
> (dub + other build system).
>
> That's my current line of reasoning, and why I haven't 
> seriously invested in dub.

So, perhaps dub itself should be used as part of your more 
general build system to build D code only?
Perhaps, there should be some integrations of of dub with other 
popular tools, so such use would be less painful.
That is ofc, in case you want your code available for others to 
use where you work, or by public.




More information about the Digitalmars-d mailing list