]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use XHPAST version instead of checksum as cache version
authorJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 19:56:35 +0000 (06:56 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 19:56:35 +0000 (06:56 +1100)
Summary: Rely on the output of `xhpast --version` when determing the lint cache key.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11611

src/lint/linter/ArcanistBaseXHPASTLinter.php

index a89ba9bc148d0b67414102413d802b761808ee66..694e4853f9bba9911f752381b099fa91e9f8bcc0 100644 (file)
@@ -14,9 +14,9 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
 
     $parts[] = $this->getVersion();
 
-    $path = xhpast_get_binary_path();
-    if (Filesystem::pathExists($path)) {
-      $parts[] = md5_file($path);
+    $version = PhutilXHPASTBinary::getVersion();
+    if ($version) {
+      $parts[] = $version;
     }
 
     return implode('-', $parts);