On 5/31/15 10:05 PM, Brad Anderson wrote:
dub fetch does this already (though probably not quite what you are
thinking of). You'd need to specify the paths manually because if it
installed them to the global compiler paths we'd have dependency hell
(what if 5 projects I have need 3 different versions of a library?).
Also, you'd need root permissions.

Usability is key here. Installing stuff should really be as simple as pasting a command. That's how Flash won over Java applets etc. etc.

I installed a Python program the other day. I think it's rather obscure - it's called "lcinvestor". I got from knowing nothing about how to install Python stuff to having the application running in minutes.

The installation page at https://pypi.python.org/pypi/lcinvestor mentions at a point:

====
The easiest way to install is with pip:

sudo pip install lcinvestor
====

So I ran that. It didn't find pip. So I googled for it (first hit if you google for "pip"). Essentially I downloaded the script get-pip.py and then ran:

python get-pip.py

That worked nicely. Then I tried running pip again, it worked, and boom, I was up and running.

But wait, there's more. I then wanted to install lcinvestor on a machine I didn't have sudo access to. Sure enough, searching for things like ``pip without sudo'' took me to http://kazhack.org/?post/2014/12/12/pip-gem-install-without-sudo where I figured all I had to do:

pip install --local lcinvestor

Boom, I was set - the installation target was ~/.local/bin/. Sure enough that was in PATH and all so the program just worked.

That's the benchmark, folks. We need to get as good or better.

That's not really how you use dub though. dub simply isn't a good fit
for people who want it to be a system package manager. Its goals are
different. If people want that they should work on getting libraries
added to their preferred system's package registries.

Then we need a different program than dub. "dip" :o).

With dub you specify the dependencies in the dub config file, not in
some obscure section of an INSTALL file as a command the users need to
run. You can checkout a project using dub and with a single command have
dub download and build all the dependencies (and their dependencies) and
then build your project against them.

That seems reasonable.

dub is about making it easy for 99% of users. If you need your own build
system then using dub just to download packages is overkill. Use git
submodules or add something to do a download of your dependencies from
github as part of your custom build system.

That seems reasonable, too.

So are we there yet?


Andrei

Reply via email to