Note: Since I first published this, Mozilla have created a Windows specific guide to address this same topic. I encourage people to use Mozilla's guide -- my original guide was intended to provide a stop gap while waiting for something like the above.
Mozilla is rolling out Phabricator as part of our tooling. However, at the time of writing I was unable to find a straight forward setup to get the Phabricator tooling playing nice on Windows with MozillaBuild.
Right now there are a couple of separate threads around how to interact with Phabricator on Windows:
However, I have stuff waiting for me on Phabricator that I'd like to interact with now, so let's get a work around in place! I started with the Arcanist windows steps, but have adapted them to a MozillaBuild specific environment.
Arcanist requires PHP. Grab a build from here. The docs for Arcanist indicate the type of build doesn't really matter, but I opted for a thread safe one because that seems like a nice thing to have.
I installed PHP outside of my MozillaBuild directory, but you can put it anywhere. For the sake of example, my install is in
We need to enable the curl extension: in the PHP install dir copy
php.ini and uncomment (by removing the
Finally, enable PHP to find its extension by uncommenting the
extension_dir = "ext" line. The Arcanist instructions suggest setting a fully qualified path, but I found a relative path worked fine.
Create somewhere to store Arcanist and libphutil. Note, these need to be located in the same directory for
arc to work.
$ mkdir somewhere/ $ cd somewhere/ somewhere/ $ git clone https://github.com/phacility/libphutil.git somewhere/ $ git clone https://github.com/phacility/arcanist.git
For me this is
Wire everything into MozillaBuild
Since I want
arc to be usable in MozillaBuild until this work around is no longer required, we're going to modify start up settings. We can do this by changing
...mozilla-build/msys/etc/profile.d/profile-extravars.sh and adding to the
PATH already being constructed. In my case I've added that paths mentioned earlier, but with MSYS syntax:
arc should run inside newly started MozillaBuild shells.
We still need credentials in order to use
mozilla-central. For this to work we need a Phabricator account, see here for that. After that's done, in order to get your credentials run
arc install-certificate, navigate to the page as instructed and copy your API key back to the command line.
There was an issue with the
evolve Mercurial extension the would cuase
Unknown Mercurial log field 'instability'!. This should now be fixed in Arcanist. See this bug for more info.
Finally, I had some issues with
arc diff based on my Mercurial config. Updating my extensions and running a
./mach bootsrap seemed to help.
Ready to go
Hopefully everything is ready to go at this point. I found working through the Mozilla docs for how to use
arc after setup helpful. If have any comments, please let me know either via email or on IRC.