Page MenuHomePhabricator

[Wilds] Remove libphutil
ClosedPublic

Authored by epriestley on Sep 18 2018, 5:48 PM.
Tags
None
Referenced Files
F13077751: D19688.diff
Tue, Apr 23, 3:52 AM
Unknown Object (File)
Fri, Apr 19, 8:52 AM
Unknown Object (File)
Fri, Apr 19, 2:55 AM
Unknown Object (File)
Fri, Apr 19, 2:55 AM
Unknown Object (File)
Fri, Apr 19, 2:55 AM
Unknown Object (File)
Fri, Apr 19, 2:55 AM
Unknown Object (File)
Thu, Apr 11, 9:52 AM
Unknown Object (File)
Thu, Apr 11, 4:09 AM
Subscribers
None

Details

Summary

Ref T13098. Historically, Phabricator was split into three parts:

  • Phabricator, the server.
  • Arcanist, the client.
  • libphutil, libraries shared between the client and server.

One imagined use case for this was that libphutil might become a general-purpose library that other projects would use.

However, this didn't really happen, and it seems unlikely to at this point: Phabricator has become a relatively more sophisticated application platform; we didn't end up seeing or encouraging much custom development; what custom development there is basically embraces all of Phabricator since there are huge advantages to doing so; and a general "open source is awful" sort of factor here in the sense that open source users often don't have goals well aligned to our goals.

Turning "arc" into a client platform and building package management solidify us in this direction of being a standalone platform, not a standalone utility library.

Phabricator also depends on arcanist/. If it didn't, there would be a small advantage to saying "shared code + client for client, shared code + server for server", but there's no such distinction and it seems unlikely that one will ever exist. Even if it did, I think this has little value.

Nowadays, I think this separation has no advantages for us and one significant cost: it makes installing arcanist more difficult for end-users.

This will need some more finesssing (Phabricator will need some changes for compatibility, and a lot of stuff that still says "libphutil" or "phutil" may eventually want to say "arcanist"), and some stuff (like xhpast) is probably straight-up broken right now and needs some tweaking, but I don't anticipate any major issues here. There was never anything particularly magical about libphutil as a separate standalone library.

Test Plan

Ran arc, it gets about as far as it did before.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

F

And for the record, rARC doesn't depend on rP, right? So this will result in strictly less setup work for users who only need arc?

This revision is now accepted and ready to land.Sep 20 2018, 7:29 PM

Yeah. rP needs rARC, but rARC is now completely standalone.

So overall less setup for everyone: no one needs rPHU anymore.

Except theoretical users who were depending on rPHU only, I guess, who have the same amount of setup but slightly more stuff on disk. You can still use rARC as a library if you want without actually using arc or any of the workflow/toolset stuff, I just believe essentially no one is doing this.

So overall less setup for everyone: no one needs rPHU anymore.

What about existing clients and servers? I think we'll have to keep rPHU itself around indefinitely, maybe with nothing in it except a README, to avoid breaking installs that have scripts like:

cd $ROOT/libphutil
git pull --rebase origin master

cd $ROOT/arcanist
git pull --rebase origin experimental

cd $ROOT/phabricator
git pull --rebase origin master

I'd imagine replacing master and stable in libphutil/ with a single "TOMBSTONE.txt" file explaining everything, and leaving it there indefinitely. So pulling will keep working, it just won't do anything interesting.

I'll likely try to make Phabricator work with either just modern arcanist/ or an older arcanist/ + libphutil/ environment, at least for a while.

If you had some kind of external or hard-coded thing which explicitly includes libphutil/whatever/whatever you're out of luck, but updating should normally be easy. I'll provide more guidance once this gets closer to actually running.

libphutil/ currently includes a ~2.5MB "xhpast.exe". I took this opportunity to remove it.

I threw away a couple of other weird scripts hanging around the scripts/ and support/ directories, too, like T13205.

This revision was automatically updated to reflect the committed changes.