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

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Wed Apr 27 08:14:21 UTC 2022


On Tuesday, 26 April 2022 at 20:30:59 UTC, H. S. Teoh wrote:
> On Wed, Apr 27, 2022 at 07:23:16AM +1200, rikki cattermole via 
> Digitalmars-d wrote:
>> 
>> On 27/04/2022 7:15 AM, Alexandru Ermicioi wrote:
>> > On Tuesday, 26 April 2022 at 18:47:44 UTC, H. S. Teoh wrote:
>> > > Well, so it looks like the time is ripe to break dub out 
>> > > of its original limitations and extend its scope to other 
>> > > languages. (And other build-like tasks, in general. ;-))
>> > 
>> > Would be nice if it will use plugin based arch, so that even 
>> > currently supported features could be extracted into 
>> > plugins, just like gradle or maven if you're from java 
>> > world, and be easy for the public to add additional custom 
>> > functionality as plugins to it without messing the internals.
>
> Totally.  A plugin-based system like gradle would work.
>
>
>> Right now shared library support is simply not at the level 
>> required to do this.
> [...]
>
> But why does a plugin system need to be based on shared 
> libraries?

I think the reason is that dub will have to compile itself with 
declared plugins first in order to be able to execute them, if no 
shared libs are used.

>
> Why not expand dub's DSL to be able to encode the kind of 
> functionality needed to write external plugins, then rewrite 
> existing functionality in terms of that DSL as a plugin?  Then 
> others can also write plugins in the same DSL, and you wouldn't 
> need to recompile dub just to add a plugin.  Just download the 
> plugin description file into some standard dub directory, and 
> dub would pick it up upon startup.

Dub is more like maven from java world. I.e. it uses declarative 
approach to define a project and how to build it.

Code based config build systems in D are more like gradle, since 
gradle dsl is just plain groovy with some ast macros.

Btw, the idea with artifact repo support in dub is good. We 
should apply it to dub repos and replace current fetching from 
git with it. Then we could upload semi built packs as well as 
fully built ones.

The point of semi built ones being that they should be 
compile-able in straightforward manner by people downloading 
them, with everything else pre-built.

Then all this dissatisfaction might disappear, since you could 
use any build system you'd want for your lib, and should be able 
to integrate semi built format easily with your tool of choice 
too if you use a lib from dub repository.



More information about the Digitalmars-d mailing list