[LLVMdev] Howdy + GIT
David Chisnall
David.Chisnall at cl.cam.ac.uk
Thu Jan 15 10:51:32 PST 2015
On 15 Jan 2015, at 18:13, Reid Spencer <reid at reactific.com> wrote:
>
> LLVM’s private and centralized repository is now hurting the project, I believe
I believe that this is far less of an issue than the massive and often gratuitous API change between versions. It's fine for Google and their rack-scale code refactoring tools, but it's problematic for everyone else unless they get their code in the tree.
The response of 'well, you should get your code in the tree' is not good, because we don't want every possible LLVM consumer to be in the tree (do we want JavaScriptCore to the in the LLVM repo because they use LLVM? What about GHC?).
How much work would you ever get done if every library that you used made significant changes to its public APIs every six months? We see the fallout from this in the FreeBSD ports collection, with the long tail of ports that depend on an old version of LLVM. The graphics stack is still on LLVM 3.3 (DRI drivers need it) and is unlikely to change soon. We've finally managed to get rid of the last ports that depended on 3.2 recently. None of those people is ever going to submit a patch, because even if they did construct one against their version of LLVM, it's so massively different from anything in the tree now that it's likely to be impossible to apply.
There is no other library that I use where I expect to have to rewrite my code that interfaces with it every few months. LLVM is the exception. This is a big barrier to adoption. The selling points of LLVM are:
- You can easily plug in a front end for your language.
- You can easily implement optimisations for your language, or the patterns in your library, on top of LLVM.
The first is sort-of true, but not quite. Using C++ APIs like IRBuilder is much easier than using the C API. We have never had even vaguely stable APIs for common things that optimisations might want to do. Even the clang tooling library, which exists explicitly for third-party consumers, encourages you to use APIs that change every few months.
Note that I'm not talking about A*B*I stability. That's hard for a C++ project, and these days recompiling is not that big a deal. We compile the entire FreeBSD ports collection (around 24K open source packages) every week, on a single machine (it takes about a day). If a library comes with a .so version bump and we need to recompile everything that depends on it, that's not a problem - we do it and the next package set ships with the new version. The packaging tools handle this automatically. Only adopting new A*P*I costs developer time.
As to git / GitHub... We already use git and a repo hosted on GitHub for some downstream projects that require modified LLVM. The fact that upstream uses svn as an authoritative store has precisely zero impact on this and we would not notice any change if the GitHub mirror became the authoritative source.
David
More information about the llvm-dev
mailing list