A suggestion for dub

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 28 22:10:17 PST 2016


On Mon, 29 Feb 2016 04:46:13 +0000, mahdi wrote:

> I just want to get some feedback to see if this is a good idea or no.
> 
> I propose adding a new command to dub (`dub dist` or `dub package`)
> which will produce a zipped version of the current package. This zip
> file can be uploaded to a central repository (code.dlang.com maybe), and
> others can use this package in their `dub.json` file by adding relevant
> dependency (Behind the scene, dub will fetch and decompress the
> package).

In other words, you want to distribute your source code, but you don't 
want to host a publicly accessibly git repository and don't want to use 
any of the free git hosting services around.

I'm not sure how this would be an advantage. You don't have to learn git, 
I guess? It's less VCS lockin? Though it probably wouldn't be so hard to 
add mercurial and svn plugins for dub.

Something that *would* be useful is a command that produces binaries and, 
in the case of libraries, D interface files so people can depend on the 
library even if the full source code isn't available. The obvious 
problem: D is typically compiled to native code. That means you have to 
compile once for each platform. Also, you need a different binary for 
every set of version() flags the thing supports. That makes binary 
distribution tricky in the general case.


More information about the Digitalmars-d mailing list