1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Don't blast if cache couldn't be saved

Summary:
It is currently causing us some pain because we use libraries in read-only directories.
Not saving the cache is still pretty bad because analysis is quite slow.
But it is better than exploding.

I considered other solutions like not .gitignoring the cache file but it would require committing it with each and every change.

I plan to resolve the note https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/linter/ArcanistPhutilLibraryLinter.php;d93bb5abd4935bc8$56-59 in longer term.

Test Plan: `arc liberate` without writable cache.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2734
This commit is contained in:
vrana 2012-06-12 17:37:30 -07:00
parent d93bb5abd4
commit a6a4b1ebbc

View file

@ -407,7 +407,11 @@ final class PhutilLibraryMapBuilder {
} }
$json = json_encode($cache); $json = json_encode($cache);
try {
Filesystem::writeFile($cache_file, $json); Filesystem::writeFile($cache_file, $json);
} catch (FilesystemException $ex) {
$this->log("Unable to save the cache!\n");
}
} }