Is it possbile to specify a remote git repo as dub dependency?
biocyberman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Dec 20 03:04:30 PST 2016
On Monday, 19 December 2016 at 16:23:45 UTC, Guillaume Piolat
wrote:
>
> What you can do for private package as of today is:
>
> - use path-based dependencies and put your packages in the same
> repo
> - use git submodules and path-based dub dependencies together
>
> If it's a public package, you can register yourself on the DUB
> repositery.
Regarding path-based dependencies, how can I use a C or
non-dub-backing project as a dependency? I defined in dub.json
like this:
"importPaths": ["non-dub-pkg"],
"dependencies": {
"non-dub-pkg": {"versions": "~master", "path": "./non-dub-pkg"}
}
And I got an error saying something like "dub could not find
dub.json or pakage.json in 'non-dub-pkg' directory". That's true
because it is a Makefile project.
@Eugene Wissner: I think a good official central registry is more
reliable for production use. I don't know that js has ten
registries. But if that is true, it is the lack of performance of
the first official registry maintainer. Have one, do well, and
recruit more talents. That will benefits people more than
scattering resources to reinvent the wheel. Nonetheless, I agree
that the support for ad-hoc dependencies is a good idea for
development.
More information about the Digitalmars-d-learn
mailing list