]> khamidou — GitHub mirrors - arcanist.git/commit
Run lint and unit tests in `arc diff` on background
authorvrana <jakubv@fb.com>
Mon, 6 Aug 2012 20:40:20 +0000 (13:40 -0700)
committervrana <jakubv@fb.com>
Wed, 8 Aug 2012 19:07:12 +0000 (12:07 -0700)
commit7e49cb4bfc9d8d947f6b4691b2cf9ce938068e2e
tree79d49b6c75b3559bef49c0e7d35f177022dc074f
parentdf81d25f1e54464493a5b2a75022077072a13cf5
Run lint and unit tests in `arc diff` on background

Summary:
I usually write commit messages 1-2 minutes.
`arc lint` in our repository usually runs for around 30 seconds, `arc unit` another minute or two.
Even Phabricator unit tests sometimes runs long (because `CREATE DATABASE` and `DROP DATABASE` is slow in our setup for some reason).

Waiting for the results is boring and unnecessary.

This diff presents two different concepts how to run them on background:

# Lint is run with `--output json`, results are parsed and presented back to user. It isn't perfect - there's no context in printed lint errors which is a serious problem.
# Unit tests are run normally and the results are written to a scratch file. It also isn't perfect - colors are lost during the process.

I'll probably choose one approach and use it on both places. Let me know your thoughts about them.

This can be further improved to resolve the futures also after inputting the update message but it can be done in a separate diff.

Test Plan:
- Remove lint engine.
- Remove unit engine.
- Make lint errors.
- Make unit errors.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, beng, tuomaspelkonen, alanh
Differential Revision: https://secure.phabricator.com/D2614
src/workflow/ArcanistDiffWorkflow.php