HomePhabricator

Run lint and unit tests in `arc diff` on background
7e49cb4bfc9dUnpublished

Unpublished Commit · Learn More

No further details are available.

Description

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:

  1. 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.
  2. 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

Details

Provenance
vranaAuthored on
Reviewer
epriestley
Differential Revision
Restricted Differential Revision
Parents
rARCdf81d25f1e54: Depend on events when attaching Diff ID to postponed unit tests
Branches
Unknown
Tags
Unknown

Event Timeline