[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
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent bd0215a826
commit acbb59c1f9

@ -443,6 +443,11 @@ class Wrapper:
def __init__(self, infer_args, buck_cmd): def __init__(self, infer_args, buck_cmd):
self.timer = utils.Timer(logging.info) 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.infer_args = infer_args
self.timer.start('Computing library targets') self.timer.start('Computing library targets')
base_cmd, buck_args = parse_buck_command(buck_cmd) base_cmd, buck_args = parse_buck_command(buck_cmd)

Loading…
Cancel
Save