DIP11: Automatic downloading of libraries

Adam D. Ruppe destructionator at gmail.com
Wed Jun 15 08:57:48 PDT 2011


Andrei Alexandrescu wrote:
>> pragma(lib) doesn't (and can't) work as it is, why do you want to add
>> more useless pragmas?

>Then we should yank it or change it.

Please no! pragma(lib) rocks.

Just because it doesn't work in *all* cases doesn't mean we should
get rid of it.

The presence of a pragma(lib) doesn't break separate compilation,
since you can still do it on the command line. Granted, it doesn't
help there, but it doesn't hurt either.

It does help for the simple case where you want "dmd myapp.d" to
just work.

>> I don't believe this tool should exist without compression being default.
> Hm. Well fine.

Note that compression for single files it built into the http
protocol. If you gzip a file ahead of time and serve it up with
Content-transfer-encoding: gzip in the headers (or something like
that), it is supposed to be transparently un-gzipped by the
user agent.

All the browsers do it, but I'm not sure if libcurl does (but
it prolly does, it's pretty complete). Regardless, even if not,
it's trivial to implement ourselves.


Compressing an entire package depends on agreeing what a package
is, but just serving up .zips of common modules works... importing
modules from a library if you must :)

The dget is free to download it and unzip to it's cache
transparently before passing the path to dmd.


More information about the Digitalmars-d mailing list