On Tue, 14 Jun 2011 10:31:59 -0500, 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 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.

So, to clarify:

> pragma(lib, acme, "http://acme.com/d/";);

...establishes a "prefix" relationship: modules names prefixed with
"acme." may be found at URLs prefixed with "http://acme.com/d/";. So we
would expect to find:

  acme.widgets         at  http://acme.com/d/widgets.d
  acme.widgets.core.x  at  http://acme.com/d/widgets/core/x.d

Correct?

Graham

Reply via email to