About two weeks ago I gave a talk on “Contriubting to GHC via Phabricator” at the local haskell.sg Meetup. Sadly the microphone died after a few minutes into the recording, and as such the video has no audio for most of the talk and is pretty useless. As the topic might be of interest to those who could not attend, I’ll write down the content of the talk as good as I can.
Let’s start with what Phabricator is, Phabricator is the code review tool GHC uses. It was originally developed at Facebook by Evan Priestley, who has since founded Phacility, Inc where the development of Phabricator continues.
Phabricator is not just used at GHC, it is also used for other projects like LLVM, the Wikimedia Foundation, FreeBSD, and a many more.
I will now try to demonstrate the usage of Phabricator for a simple change (with many pictures!).
Creating an account
I have a change in my tree
Phabricator is not really concerned how your local tree looks like. It essentially only cares about differences. So you can go wild with your local branch management; use git however you like.
For Phabricator try to think in patches (differences) instead of commits.
For the following example, I’ve been working on cross compiler related issues and while doing so, I usually accumulate lots of different fixes in my branch.
Phabricator has a companion tool called arcanist:
“arc — arcanist, a code review and revision management utility”
To install it, we need to clone the following two repositories:
Next we’ll need to tell connect arc with our phabricator account on phabricator.haskell.org. To do this we need to run the follwing command from within the ghc repository
ghc $ arc install-certificate
Where to go from here?
Now someone will have to come and review the code, and select the “Accept” Action. If the code is accepted, you can run arc landif you have commit access to GHC. If you do not have commit access worry not, someone with commit access will usually aggregate accepted diffs run ./validate on them and if that passes push them to the GHC repository.
If you like what you read and want to support further work like this, feel free to support me via patreon or send cryptocurrencies to