[gsoc] DUB - Ideas

Atila Neves atila.neves at gmail.com
Mon Mar 4 10:19:29 UTC 2019


On Sunday, 3 March 2019 at 15:59:44 UTC, Joseph Rushton Wakeling 
wrote:
> On Sunday, 3 March 2019 at 13:43:15 UTC, Seb wrote:
>> On Sunday, 3 March 2019 at 13:24:21 UTC, Joseph Rushton 
>> Wakeling wrote:
>>> One can already just add a git submodule and point the dub 
>>> dependency declaration at the resulting directory.
>>
>> Dub doesn't support git submodules (because it downloads the 
>> Zip archive from GitHub/GitLab).
>
> I think we may be talking at cross-purposes.  Here's what I was 
> suggesting w.r.t. using git repos as a source for dub 
> dependencies:
>
> (1) add a submodule to your current project (let's use mir-glas 
> as an example):
>     git submodule add --name mir-glas 
> https://github.com/libmir/mir-glas.git mir-glas
>
> (2) add a dependency to dub.json pointing at the submodule 
> directory:
>
>         "dependencies": {
>             "mir-glas": { "path": "./mir-glas" }
>         }
>
> This is only really needed though if one wants to create 
> dependencies on projects that are not public DUB packages.  I 
> think this ought to also support nested submodules, though I 
> have not tried it.

This doesn't work. Worse, it actually does work if you test 
adding this dub package (the one that has mir-glas as a 
dependency) locally by using 
`path="/path/to/thing/needing/mir-glass"`. Then you tag a new 
version, try using a version dependency and... oops. Check out 
all the v0.2.x releases for autowrap here:

https://github.com/kaleidicassociates/autowrap/releases

Notice how they're all from two different days. That was me 
trying to make pyd a dependency as a git submodule. I have to 
give up and go up to v0.3.0 since none of those tags work.



More information about the Digitalmars-d mailing list