]> khamidou — GitHub mirrors - arcanist.git/commit
Allow caching lint results
authorvrana <jakubv@fb.com>
Wed, 21 Nov 2012 00:43:10 +0000 (16:43 -0800)
committervrana <jakubv@fb.com>
Wed, 21 Nov 2012 21:21:10 +0000 (13:21 -0800)
commit3cfd58c29c2d322e622d627afc856e9a6fbba519
tree60f3a4c51d5a2cb8e7ad8448c8e865559b5dcc72
parent0cf8ef02d8a64c103df48082a95fb1c8fb05670b
Allow caching lint results

Summary:
There is one big decision: How to get linters version.
I've created `getCacheVersion()` which is supposed to be bumped every time engine or any linter is changed.
This is not very nice but the other alternative (detect this automatically) seems worse:

- The engine may be outside repo and may or may not be under version control so getting its version through something like `git log` may not be even possible.
- If it is in the same repo then every rebase will obsolete the whole cache.

Even though bumping the version manually is PITA I still think it's a better solution.

Test Plan:
  $ time arc lint --cache 1
  # verified file
  $ arc arc lint --cache 1
  # added some debug output to see the cached results
  # also observed better time (.57 s instead of 2.19 s)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T2036

Differential Revision: https://secure.phabricator.com/D4006
src/lint/ArcanistLintMessage.php
src/lint/engine/ArcanistLintEngine.php
src/workflow/ArcanistDiffWorkflow.php
src/workflow/ArcanistLintWorkflow.php