Page MenuHomePhabricator

Modernize the "arc diff" workflow
Open, NormalPublic

Description

See PHI1758. Currently, automatic detection of "Depends on" is short-circuited.

arc diff has a very large number of arguments, some of which I'd like to simplify or remove.

I think --raw and --raw-command can be simplified into --raw <path> which accepts -.

I'd like to remove lint/unit excuses.

These flags should become prompt configuration:

  • --allow-untracked
  • --uncommitted
  • --ignore-unsound-tests
  • --amend-autofixes
  • --amend-all
  • --apply-patches

These flags should be removed since I don't think they make sense in the context of arc diff:

  • --lintall
  • --advice
  • --only-new

These flags should be replaced with some kind of arc apply workflow:

  • --reviewers
  • --cc

I'm not sure --use-commit-message has any real use cases.

Perhaps --edit can be moved to some arc apply-esque arc edit, although I am currently not excited about writing a general-purpose CLI edit workflow for any object type (many complex controls seem very difficult to represent in text form).

Event Timeline

epriestley triaged this task as Normal priority.May 30 2020, 9:26 PM
epriestley created this task.

I'm not sure --use-commit-message has any real use cases.

This was introduced a very long time ago in D1385 and appears to support a workflow which no longer exists, so I'm just going to remove it.

arc diff has a lot of code to deal with handling untracked or uncommitted changes in the working copy. The major motivations for arc caring about this are:

  • we generally can not run unit tests unless we have a working copy; and
  • we often can not run lint on files which aren't present in the working copy; and
  • unit test results run in a working copy with a bunch of extra changes may not produce the right answer (for example: they may pass, when the change-as-landed fails, because you have uncommitted code which is required for them to pass); and
  • at a not-insignificant rate, users simply forget to add files. In ~2010, after I disabled this prompt because several engineers insisted that no one ever forgets to add files, a user forgot to add a file at Facebook and broke all ads for about a day, costing Facebook a trillion zillion dollars.

Generally, many users don't like the behavior of arc here, and would like to keep a big pile of uncommitted changes loose in their working copies at all times and believe this will never lead to errors. I believe they are, on average, wrong, but am also now more eager to give users enough rope to shoot themselves in the feet than I was in the past.