From acbb59c1f93e904d60e37867377d36a0633edfc3 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Wed, 21 Sep 2016 12:25:24 -0700 Subject: [PATCH] [infer][java] print an error message when using the option --reactive with Java buck projects Summary: The reactive mode is not currently supported for Java Buck projects. Print a clear error message to avoid confusion. Using `--reactive` with Buck projects is crashing. When using reactive, the backend crashes because it tries to find the `.start` file in `infer-out` whereas Infer saves the analysis artifacts next to the generated classes following the `-d` options with Buck so that they can be cached. Pointing the backend to the right Infer out would not help as this directory will be blown up as soon as the files are modified. Reviewed By: sblackshear Differential Revision: D3901005 fbshipit-source-id: d8dcbce --- infer/lib/python/inferlib/bucklib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index 9295d0abf..e11d5e0d5 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -443,6 +443,11 @@ class Wrapper: def __init__(self, infer_args, buck_cmd): self.timer = utils.Timer(logging.info) + # The reactive mode is not yet supported + if infer_args.reactive: + sys.stderr.write( + 'Reactive is not supported for Java Buck project. Exiting.\n') + sys.exit(1) self.infer_args = infer_args self.timer.start('Computing library targets') base_cmd, buck_args = parse_buck_command(buck_cmd)