From e3b4820e5471fec4dbd330e35f2d809e48aa982f Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Wed, 28 Sep 2016 20:46:20 -0700 Subject: [PATCH] [infer][java] Checks if the output jar exists on disk before trying to load the analysis artifacts from it Summary: During the incremental analysis using the Buck distributed cache, if there is a cache hit for a given module, the output jars for the intermediate targets are not necessarily dowloaded. We therefore need to filter the jar files that are present on disk before loading the analysis artifacts from it. This will also be neccesary when combined with the --keep-going option of Buck Reviewed By: sblackshear Differential Revision: D3941853 fbshipit-source-id: befda63 --- infer/lib/python/inferlib/bucklib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index 3fdffd5fc..f5a44aa4a 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -279,7 +279,8 @@ def get_output_jars(targets): else: audit_output = subprocess.check_output( ['buck', 'audit', 'classpath'] + targets) - return audit_output.strip().split('\n') + classpath_jars = audit_output.strip().split('\n') + return filter(os.path.isfile, classpath_jars) def collect_results(args, start_time, targets):