DIP11: Automatic downloading of libraries

Steven Schveighoffer schveiguy at yahoo.com
Wed Jun 15 08:07:47 PDT 2011


On Wed, 15 Jun 2011 10:33:21 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

>> dget would just add the appropriate path:
>>
>> import dcollections.TreeMap =>
>> get
>> http://www.dsource.org/projects/dcollections/import/dcollections/TreeMap.d
>> hm.. doesn't work
>> get
>> http://www.dsource.org/projects/dcollections/import/dcollections/TreeMap.di
>> ok, there it is!
>
> This assumes the URL contains the package prefix. That would work, but  
> imposes too much on the URL structure. I find the notation -Upackage=url  
> more general.

Look at the url again, I'll split out the include path and the import:

[http://www.dsource.org/projects/dcollections/import] /  
[dcollections/TreeMap.di]

There is nothing being assumed by dget.  It could try and import  
dcollections.TreeMap from some other remote path as well, and fail.  It  
follows the same rules as the current import scheme, just with urls  
instead of paths.

-Steve


More information about the Digitalmars-d mailing list