From eab0c19c65dbb88e8968eed53629efbc0d4a2884 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 31 Jan 2017 13:30:35 -0800 Subject: [PATCH] [infer][java] Force the option --deep when running Infer on Java Buck projects Summary: The Buck integration assumes that the output jar file of all the dependency targets are available locally in order to retrieve the analysis from these targets. However, this is not guaranteed to be true when there is a cache hit on some targets. Running `buck build` with the option `--deep` forces this property. Reviewed By: jvillard Differential Revision: D4474036 fbshipit-source-id: accabfa --- infer/lib/python/inferlib/bucklib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index 92d2d8c33..950e8dd33 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -210,7 +210,10 @@ def parse_buck_command(args): parsed_args = parser.parse_args(buck_args) base_cmd_without_targets = [p for p in buck_args if p not in parsed_args.targets] - base_cmd = ['buck', build_keyword] + base_cmd_without_targets + buck_build_command = ['buck', build_keyword] + if not parsed_args.deep: + buck_build_command.append('--deep') + base_cmd = buck_build_command + base_cmd_without_targets return base_cmd, parsed_args else: