Page MenuHomePhabricator

Strip libphutil for parts
Closed, ResolvedPublic

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.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

epriestley created this task.
epriestley added a revision: Restricted Differential Revision.Sep 2 2019, 1:43 PM
epriestley added a revision: Restricted Differential Revision.Sep 2 2019, 2:20 PM
epriestley added a commit: Restricted Diffusion Commit.Sep 2 2019, 2:59 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Sep 25 2019, 9:36 PM
epriestley added a revision: Restricted Differential Revision.Sep 25 2019, 9:40 PM
epriestley added a commit: Restricted Diffusion Commit.Sep 25 2019, 11:47 PM
epriestley added a commit: Restricted Diffusion Commit.Sep 25 2019, 11:50 PM
epriestley added a revision: Restricted Differential Revision.Jan 14 2020, 7:41 PM
epriestley added a revision: Restricted Differential Revision.Jan 14 2020, 7:48 PM
epriestley added a commit: Restricted Diffusion Commit.Jan 14 2020, 7:49 PM
epriestley added a commit: Restricted Diffusion Commit.

See also https://discourse.phabricator-community.org/t/storage-upgrade-failed-class-phutilauthadapter-not-defined/3468.

If you have a piece of custom extension code which:

  • extends some class previously defined in libphutil/; and
  • is loaded via libphutil/src/extensions/.

You must move it to arcanist/src/extensions/ (if it extends a class now defined in arcanist/) or phabricator/src/extensions/ (if it extends a class now defined in phabricator/). Extensions loaded via libphutil/src/extensions/ may not extend classes which are no longer defined in libphutil/.

epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 7:47 PM
epriestley added a revision: Restricted Differential Revision.
epriestley added a commit: Restricted Diffusion Commit.Feb 12 2020, 7:48 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 7:58 PM
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 8:01 PM
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 8:30 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 12 2020, 9:13 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 10:37 PM
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 11:06 PM
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 11:11 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 12 2020, 11:16 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 11:45 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 12 2020, 11:53 PM
epriestley added a revision: Restricted Differential Revision.Feb 12 2020, 11:58 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 13 2020, 12:20 AM

I'm also going to collapse as much of experimental into master as I can here, make the minimum required PHP version 5.5 (see T11968), and attempt to collapse wilds.

epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 1:51 PM
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 2:03 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 13 2020, 2:04 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 3:59 PM
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 9:54 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 13 2020, 10:10 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 10:32 PM
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 10:58 PM
epriestley added a revision: Restricted Differential Revision.Feb 13 2020, 11:12 PM
epriestley added a revision: Restricted Differential Revision.Feb 14 2020, 4:30 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 14 2020, 4:32 PM
epriestley added a revision: Restricted Differential Revision.Feb 14 2020, 4:38 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 14 2020, 4:44 PM
epriestley added a revision: Restricted Differential Revision.Feb 14 2020, 4:47 PM
epriestley added a revision: Restricted Differential Revision.Feb 14 2020, 5:12 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 14 2020, 5:14 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.Feb 14 2020, 5:16 PM
epriestley added a revision: Restricted Differential Revision.Feb 14 2020, 9:04 PM
epriestley claimed this task.

I have another patch on top of D20998 which brings unit over, but it's currently so broken that it can't diff itself.

The diff between master and wilds is still fairly large, but much of what is left can't port cleanly right now (e.g. "delete all lint code") or doesn't need to ever come over. I'm going to call this "done" since libphutil looks dead in any case.

epriestley added a commit: Restricted Diffusion Commit.Apr 24 2020, 3:41 PM
epriestley added a revision: Restricted Differential Revision.Feb 8 2021, 5:47 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 8 2021, 6:20 PM
epriestley added a revision: Restricted Differential Revision.Mar 16 2021, 5:26 PM
epriestley added a commit: Restricted Diffusion Commit.Mar 16 2021, 5:28 PM