[buck/java2] eliminate project root config flag

Summary:
Passing an absolute project path as buck config flag makes buck caching almost impossible for infer artefacts, since on every host/run that directory can be different.

Eliminate that and rely on shell commands to find the project root, executed within the genrule.

Reviewed By: jvillard

Differential Revision: D15963807

fbshipit-source-id: b6e590029
master
Nikos Gorogiannis 5 years ago committed by Facebook Github Bot
parent 0f5ae186b3
commit 97c41120ae

@ -160,9 +160,7 @@ let die_if_empty f = function [] -> f L.(die UserError) | l -> l
let buck_config =
lazy
( if Config.genrule_master_mode then
[ "infer.project_root=" ^ Utils.realpath Config.project_root
; "infer.infer_out=" ^ Utils.realpath Config.results_dir
; "infer.version=" ^ Version.versionString
[ "infer.version=" ^ Version.versionString
; "infer.infer_bin=" ^ Config.bin_dir ^/ Config.exe_basename
; "infer.mode=capture" ]
|> List.fold ~init:[] ~f:(fun acc f -> "--config" :: f :: acc)

@ -7,12 +7,7 @@ def _get_infer_bin():
return read_config("infer", "infer_bin")
def _get_project_root():
return read_config("infer", "project_root")
def _get_infer_deps():
infer_out = read_config("infer", "infer_out")
infer_deps = "{}/infer-deps.txt".format(infer_out)
return infer_deps
return "\$(git rev-parse --show-toplevel)/infer/tests/build_systems/genrulecapture"
def _infer_capture_genrule(
name,

Loading…
Cancel
Save