Page MenuHomePhabricator

Strip libphutil for parts
Open, LowPublic

Description

Today, libphutil has a substantial amount of code which is used only by Phabricator, not by Arcanist.

Historically, the theory here was that libphutil might be used as a third-party library (e.g., you want LinesOfALargeFile or something, so you link against libphutil). Although a handful of use cases for this do exist, they're rare, and first-party and third-party extension development against Phabricator almost universally treats Phabricator as a whole web application platform, not as a utility library.

In an alternate future, D19688 completely removes libphutil. However, this leaves Arcanist with a lot of code it doesn't interact with and which has no reason to be there.

The state of the world can generally be made easier to reason about by moving web-only pieces of libphutil to Phabricator and retconning the merge in D19688. These pieces can move in particular:

  • All OAuth Adapters. Arcanist will never realistically drive an OAuth handshake. (Some usage of OAuth-authenticated APIs may make sense to retain.)
  • All Query layer stuff. Arcanist will never realistically connect directly to a MySQL database.
  • Stuff related to sprites (can this all just be deleted?)
  • All remarkup / markup engine code. Arcanist will never realistically need to render remarkup locally, and can't get a consistent result in the presence of extensions. If it did want to do this kind of rendering, it would use the API.
  • Stemming and search query parsing code.
  • Calendar/ICS parsers.
  • Lipsum Context Free Grammars.

Related Objects