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)
Mon, Nov 4, 2:57 AM
Unknown Object (File)
Wed, Oct 30, 5:40 PM
Unknown Object (File)
Sun, Oct 27, 11:00 PM
Unknown Object (File)
Sat, Oct 26, 1:13 PM
Unknown Object (File)
Oct 20 2024, 3:45 AM
Unknown Object (File)
Oct 20 2024, 3:45 AM
Unknown Object (File)
Oct 20 2024, 3:43 AM
Unknown Object (File)
Oct 18 2024, 8:18 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.