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)
Fri, Dec 20, 11:27 PM
Unknown Object (File)
Sat, Dec 14, 4:44 AM
Unknown Object (File)
Tue, Dec 10, 4:04 PM
Unknown Object (File)
Sun, Dec 1, 3:52 PM
Unknown Object (File)
Nov 4 2024, 2:57 AM
Unknown Object (File)
Oct 30 2024, 5:40 PM
Unknown Object (File)
Oct 27 2024, 11:00 PM
Unknown Object (File)
Oct 26 2024, 1:13 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.