On 2014-10-27 03:33, Tofu Ninja wrote:
I don't think this is a new idea but it would be pretty awesome.

So the idea is that the compiler could check dub for libraries that it
can't find and automatically download and integrate them. It would
essentially make all of dub seem like it was a part of the standard lib
and make integrating dub into projects seamless.

I don't really like the idea. I don't see the point of it, for a couple of reasons:

* There are still other parts of the configuration that needs to live somewhere. Which compiler switches should be used and so on

* I don't know exactly how Dub works but in theory it could ask the registry of the complete set of dependencies for a particular build and start to download all of them. With your suggestion the compiler might need to ask the registry many times to get all dependencies. First it sees "import foo" which it can't resolve and asks the registry about that. Then it needs to compile "foo" to find out if it has any dependencies as well. This applies recursively to all imports

--
/Jacob Carlborg

Reply via email to