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