1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-06 04:41:00 +01:00
phorge-arcanist/support
epriestley a62c1d70db [Wilds] Handle SIGINT (^C) in ArcanistRuntime in a more formal way
Summary:
Ref T13098. Add ^C handling and some small bits:

  - Update `arc weld`.
  - Test that `arc weld filen<tab>` completes `filename` (it does).
  - Add a "workflow stack" -- I plan to make it easier for `arc diff` to call `arc unit` / `arc lint` as formal sub-workflows, etc., and make "workflow X delegates to workflow Y" a more formal thing.

On interrupts:

  - Workflows can do something when you press ^C.
  - If they do, press ^C twice quickly to exit.
  - Otherwise, we exit on the first ^C.

The major thing I'd like to do in the short-ish term is to make `phage` report status on interrupt, but some other workflows might make sense to have interrupt handlers (maybe long-running stuff like `arc upload` / `arc download`) and third parties may find creative uses for them.

Test Plan:
- Added some `sleep(...)` to WeldWorkflow.
- Interrupted, got program exit.
- Added interrupt handlers and interrupted, got interrupt handling.
- With interrupt handlers, interrupted twice. Got program exit.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13098

Differential Revision: https://secure.phabricator.com/D19703
2018-09-26 14:07:25 -07:00
..
parser [Wilds] Remove libphutil 2018-09-21 16:38:53 -07:00
shell [Wilds] Shell complete files with spaces in them correctly 2018-09-25 16:15:51 -07:00
xhpast [Wilds] Remove libphutil 2018-09-21 16:38:53 -07:00
ArcanistRuntime.php [Wilds] Handle SIGINT (^C) in ArcanistRuntime in a more formal way 2018-09-26 14:07:25 -07:00