From 636bcef5ca67a297d456c41a768e46f6827a0c95 Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 21 Jun 2012 11:48:23 -0700 Subject: [PATCH] Save files with path to phutil cache Test Plan: $ arc liberate $ mv a.php b.php $ arc liberate Previously, it didn't update the map. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2818 --- scripts/lib/PhutilLibraryMapBuilder.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/lib/PhutilLibraryMapBuilder.php b/scripts/lib/PhutilLibraryMapBuilder.php index 6b1e0d60..d3db801d 100755 --- a/scripts/lib/PhutilLibraryMapBuilder.php +++ b/scripts/lib/PhutilLibraryMapBuilder.php @@ -37,7 +37,7 @@ final class PhutilLibraryMapBuilder { const LIBRARY_MAP_VERSION = 2; const SYMBOL_CACHE_VERSION_KEY = '__symbol_cache_version__'; - const SYMBOL_CACHE_VERSION = 3; + const SYMBOL_CACHE_VERSION = 4; /* -( Mapping libphutil Libraries )---------------------------------------- */ @@ -420,7 +420,9 @@ final class PhutilLibraryMapBuilder { continue; } - $map[$file] = $hash; + // We include also filename in the hash to handle cases when the file is + // moved without modifying its content. + $map[$file] = md5($hash.$file); } return $map;