From dba7e7124f3390bfb681c7b016ebd678dfe746d4 Mon Sep 17 00:00:00 2001 From: jrm Date: Thu, 4 Feb 2016 11:20:17 -0800 Subject: [PATCH] revive the @PerforamanceCritical checker when using Buck Summary: public The PerformanceCritical Checker was not running on Buck project due to a conflict between the incremental mode and the ondemand mode. Reviewed By: cristianoc Differential Revision: D2891649 fb-gh-sync-id: 0a503d8 --- infer/lib/python/infer | 7 +++++-- infer/lib/python/inferlib/analyze.py | 3 +-- infer/lib/python/inferlib/bucklib.py | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/infer/lib/python/infer b/infer/lib/python/infer index 452136a35..81b34f5b7 100755 --- a/infer/lib/python/infer +++ b/infer/lib/python/infer @@ -112,8 +112,11 @@ def main(): args = global_argparser.parse_args(to_parse) - if (imported_module and not args.incremental and - capture_module_name != 'analyze'): + remove_infer_out = (imported_module + and not args.incremental + and capture_module_name != 'analyze' + and not args.buck) + if remove_infer_out: analyze.remove_infer_out(args.infer_out) if imported_module: diff --git a/infer/lib/python/inferlib/analyze.py b/infer/lib/python/inferlib/analyze.py index edee91857..25ef18402 100644 --- a/infer/lib/python/inferlib/analyze.py +++ b/infer/lib/python/inferlib/analyze.py @@ -430,8 +430,7 @@ class Infer: elif self.args.project_root: infer_options += ['-project_root', self.args.project_root] - if self.args.analyzer in [config.ANALYZER_CHECKERS, - config.ANALYZER_ERADICATE]: + if self.args.analyzer in [config.ANALYZER_CHECKERS]: os.environ['INFER_ONDEMAND'] = 'Y' os.environ['INFER_OPTIONS'] = ' '.join(infer_options) diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index d5802fa0b..7ae04cddd 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -66,7 +66,6 @@ def prepare_build(args): infer_options = [ '--buck', - '--incremental', '--analyzer', args.analyzer, ]