DIP11: Automatic downloading of libraries
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Jun 15 08:23:58 PDT 2011
On 6/15/11 10:07 AM, Steven Schveighoffer wrote:
> 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]
I understood the first time. Yes, so it imposes on the url structure
that it ends with /dcollections/.
> 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.
I don't think it's a good idea to search several paths for a given
import. One import should map to two download attempts: one for the .di,
next for .d.
Andrei
More information about the Digitalmars-d
mailing list