DIP11: Automatic downloading of libraries

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jun 14 08:31:59 PDT 2011


On 6/14/11 10:27 AM, Graham Fawcett wrote:
> On Tue, 14 Jun 2011 08:53:16 -0500, Andrei Alexandrescu wrote:
>
>> http://www.wikiservice.at/d/wiki.cgi?LanguageDevel/DIPs/DIP11
>>
>> Destroy.
>>
>>
>> Andrei
>
> What's the expected payload format? A text/plain D source-file? A zip or
> tar archive?

Text for now.

> If an archive, what's the required directory layout? Should
> "dsource.foo.baz" be required to be in "/dsource/foo/baz.d" within the
> archive?

I agree we need to address these in the future, and also binary 
distributions (e.g. .di files + .a/.lib files).

> And if not an archive, how to reasonably handle multi-file packages?

Consider a library "acme" consisting of three files: widgets.d, 
gadgets.d, fidgets.d in "http://acme.com/d/". It also depends on the 
external library monads on "http://nad.mo/d".

// User code:
pragma(lib, acme, "http://acme.com/d/");
import acme.widgets;
... use ...

// widgets.d
// Assume it depends on other stuff in the same lib
// and on monads.d
pragma(lib, monads, "http://nad.mo/d/");
import acme.gadgets, acme.fidgets, monads.io;

This is all that's needed for the compiler to download and compile 
everything needed.


Andrei


More information about the Digitalmars-d mailing list