Page MenuHomePhabricator

[Wilds] Rewrite "arc" entrypoints for toolsets
ClosedPublic

Authored by epriestley on Sep 14 2018, 7:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 12:32 AM
Unknown Object (File)
Fri, Apr 19, 7:57 PM
Unknown Object (File)
Thu, Apr 11, 5:25 AM
Unknown Object (File)
Sat, Mar 30, 6:43 AM
Unknown Object (File)
Sat, Mar 30, 6:43 AM
Unknown Object (File)
Sat, Mar 30, 6:43 AM
Unknown Object (File)
Mar 20 2024, 10:26 PM
Unknown Object (File)
Mar 20 2024, 10:26 PM
Subscribers
None

Details

Summary

Ref T13098. Depends on D19675. This change is headed to the untamed-wilds branch.

This change prevents arc from running arc diff, so I'm copy/pasting it.

This change also completely breaks arc, but I'm just generally trying to do this rewrite step-by-step so we have at least a bit of context to refer to in the future.

The major change here is to turn both arc and phage into scripts which start an ArcanistRuntime. This runtime then decides which workflows (like "diff", "patch", or "remote") are available based on $argv[0]. This turns arc into more of a CLI tools platform: we can build phage on it, third parties can build my-companion-tool-thing, etc. But all the different entry points can share a lot of infrastructure like: help, alias, shell-complete, configuration, Conduit, prompting, --trace, extension infrastructure, and so on.

ArcanistRuntime is roughly a slightly more modern version of scripts/arcanist.php. That will be removed eventually, but not everything has ported yet.

Test Plan

This code basically doesn't run yet, although the next patch runs at least a little bit.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 14 2018, 7:04 PM
Harbormaster failed remote builds in B20830: Diff 47017!

This is mostly a cut/paste from scripts/arcanist.php to scripts/init/init-arcanist.php, right? I'm trying to figure out how much of this to review.

Yeah, this is at least mostly just reshuffling code.

This revision is now accepted and ready to land.Sep 19 2018, 5:13 PM
This revision was automatically updated to reflect the committed changes.