[infer][java] disable the cache of specs files used to speed up the analysis of Buck Java projects

Reviewed By: sblackshear

Differential Revision: D5970627

fbshipit-source-id: 2f616d6
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 3b2e9c78de
commit 6f0c4cda4a

@ -32,6 +32,8 @@ DEFAULT_BUCK_OUT_GEN = os.path.join(DEFAULT_BUCK_OUT, 'gen')
INFER_JSON_REPORT = os.path.join(config.BUCK_INFER_OUT,
config.JSON_REPORT_FILENAME)
USE_INFER_CACHE = False
INFER_SCRIPT = """\
#!/usr/bin/env {python_executable}
import subprocess
@ -55,12 +57,14 @@ def prepare_build(args):
args.java_jar_compiler,
]
# Create a temporary directory as a cache for jar files.
infer_cache_dir = os.path.join(args.infer_out, 'cache')
if not os.path.isdir(infer_cache_dir):
os.mkdir(infer_cache_dir)
infer_options += ['--infer-cache', infer_cache_dir]
temp_files = [infer_cache_dir]
temp_files = []
if USE_INFER_CACHE:
# Create a temporary directory as a cache for jar files.
infer_cache_dir = os.path.join(args.infer_out, 'cache')
if not os.path.isdir(infer_cache_dir):
os.mkdir(infer_cache_dir)
infer_options += ['--infer-cache', infer_cache_dir]
temp_files += [infer_cache_dir]
try:
infer_command = [utils.get_cmd_in_bin_dir('infer')] + infer_options

Loading…
Cancel
Save