Low hanging fruit: dub git integration

rikki cattermole via Digitalmars-d digitalmars-d at puremagic.com
Tue May 16 18:54:20 PDT 2017


On 16/05/2017 7:10 PM, Andre Pany wrote:
> Hi,
>
> While integrating the git protocol into dub is complex, there is a much
> much easier solution.
>
> Github and bitbucket provides access to the source code, including
> releases, branches and commits as archive files using the http protocol.
>
> Without counting the actual unzip/untar coding I assume more or less 100
> lines of additional coding is needed in dub.
>
> In dub.json in addition to the existing path attribute of the dependeny
> object a new attribute "url" has to be added. You can specify here an
> url to a zip/tar.gz. This file has to be downloaded and extracted. The
> extract path is then filled into the existing path attribute of the
> dependency object.
>
> The only issue is the untar/unzip logic...
>
> This little tweak would make dub a lot more flexible like npm.
>
> Kind regards
> André

I've built a prototype UI[1] for some code[0] to solve this exact problem.

It may seem complex, but you can't rely on HTTP download options for 
easy access to repositories.

I would appreciate anyone taking the time to do the survey[1] (the 
question mark) which has a couple of tasks to do. It'll give you the 
basic idea of what I'm thinking UI wise.

[0] https://gist.github.com/rikkimax/4718740223748256d94b3b1474525012
[1] http://cattermole.co.nz/comp626/


More information about the Digitalmars-d mailing list