]> khamidou — GitHub mirrors - arcanist.git/commit
Disable lint cache by default
authorepriestley <git@epriestley.com>
Tue, 23 Apr 2013 18:26:28 +0000 (11:26 -0700)
committerepriestley <git@epriestley.com>
Tue, 23 Apr 2013 18:26:28 +0000 (11:26 -0700)
commit957249f56c35f23e3305e2b07492181fd2a03c78
tree2e24e232fd4978ec4fba6e3fe325ff418b891e54
parent410ea5dc328c826dc1d0747ea970aa6ad981fc45
Disable lint cache by default

Summary:
Fixes T2266. Motivation:

  - The lint cache does not always invalidate correctly. Because of the nature of the cache, this is a hard problem (right after "naming things").
    - We already have a fair amount of complexity in trying to invalidate it, and are still discovering new places where it doesn't work (e.g., Windows with "/" vs "\" paths).
    - One invalidation failure is when linter code changes, which seems unresolvable in the general case (e.g., changes to external linters).
  - It's not obvious what's happening when the lint cache causes some kind of issue.
    - Particularly while developing or debugging linters, your changes often won't be reflected in the lint output. Some of this is theoretically tractable but the external linter case probably isn't.
  - When someone reports a problem with the lint cache in IRC or elsewhere, there is essentially never a way for me to fix it. The lint cache can't be debugged effectively without access to a working copy where the problem reproduces.
  - The cache provides limited benefit outside of Facebook's install.

To remedy these issues:

  - Introduce configuration which controls cache usage.
  - Default it off.
  - Print a message when the cache is in use.

(I'd tentatively support removing the cache entirely, but I don't know how @vrana and Facebook feel about that.)

Test Plan: Ran `arc set-config --show`, `arc lint --cache 0`, `arc lint --cache 1`.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, mbishopim3, nh, edward, wez
Maniphest Tasks: T2266

Differential Revision: https://secure.phabricator.com/D5766
src/configuration/ArcanistSettings.php
src/workflow/ArcanistLintWorkflow.php