neovim/neovim — pull request #99 by rjw57 (2014-02-24 10:22:13+00:00)
Title: bundle expected libuv via git subtree

As evidenced by #13 it is surprising to people that libuv is fetched at
``make``-time. This also necessitates an Internet connection *and* GitHub being
up in order to compile neovim. Both of these requirements are similarly
surprising to experienced developers.

Since we mandate a particular version of libuv and are reticent to allow the
use of system-supplied libraries, it makes sense to use ``git subtree`` to
bundle that version directly into a ``third-party`` directory and modify the
existing ``get-libuv.sh`` script to only compile that version. The use of ``git
subtree`` also has the advantage that a) the precise commit of libuv being used
is recorded in the repository history and b) we can move to a later version of
libuv directly by appropriate ``git subtree`` incantation recorded in source
history rather than fiddling with ``get-libuv.sh``.

Use the ``--squash`` parameter to ``git subtree`` to avoid pulling in the
entirety of libuv's history. This makes the difference in bandwidth required
between bundling libuv and fetching a tarball directly negligible.

An alternative solution would be to separate compilation from dependency
fetching. Perhaps moving the fetching to the ``make cmake`` stage?

This PR does not completely address #13 since, unless one notices the "build"
instructions in the README, the usual ``mkdir build && cd build && cmake .. &&
make`` recipe for compilation will fail unexpectedly which is likely to lead to
lots of #13 dupes being opened.