www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Import from github

reply eugene <egordeev18 gmail.com> writes:
Hello everyone,
can i do in D something like this:
import "github.com/julienschmidt/httprouter"
like in Golang?
Jul 28 2016
next sibling parent reply Lodovico Giaretta <lodovico giaretart.net> writes:
On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote:
 Hello everyone,
 can i do in D something like this:
 import "github.com/julienschmidt/httprouter"
 like in Golang?
No, but many D libraries you find on github are registered on DUB, so you can use it to manage your dependencies (if that library is not registered on DUB, ask its maintainer to register it, as it's the best way to manage your dependencies in D).
Jul 28 2016
parent Seb <seb wilzba.ch> writes:
On Thursday, 28 July 2016 at 13:39:43 UTC, Lodovico Giaretta 
wrote:
 On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote:
 Hello everyone,
 can i do in D something like this:
 import "github.com/julienschmidt/httprouter"
 like in Golang?
No, but many D libraries you find on github are registered on DUB, so you can use it to manage your dependencies (if that library is not registered on DUB, ask its maintainer to register it, as it's the best way to manage your dependencies in D)
You might also subscribe to this thread: https://github.com/dlang/dub/issues/50
Jul 28 2016
prev sibling parent reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote:
 Hello everyone,
 can i do in D something like this:
 import "github.com/julienschmidt/httprouter"
 like in Golang?
Yes, latest version of DUB just added support for this via a special comment syntax that describes dependencies on DUB-packages. For details on this syntax see: http://forum.dlang.org/thread/nk93ge$1jhe$1 digitalmars.com?page=1
Aug 01 2016
parent Jacob Carlborg <doob me.com> writes:
On 2016-08-01 11:51, Nordlöw wrote:

 Yes, latest version of DUB just added support for this via a special
 comment syntax that describes dependencies on DUB-packages.

 For details on this syntax see:
 http://forum.dlang.org/thread/nk93ge$1jhe$1 digitalmars.com?page=1
Unless the question is if it's possible to import/use a package directly from GitHub, then the answer is no. -- /Jacob Carlborg
Aug 02 2016