DIP11: Automatic downloading of libraries

Jacob Carlborg doob at me.com
Fri Jun 17 09:18:05 PDT 2011


On 2011-06-14 17:31, Andrei Alexandrescu wrote:
> 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 the tool will download individual text files it will be quite 
ineffective, it's like comparing a svn checkout with a git clone. The 
git clone is a lot more effective. It would be better to download an 
archive of some sort.

>> 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


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list