From 93f33d07b8120a3ae316f418e69324b0502a5bcf Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 2 Feb 2017 08:05:36 -0800 Subject: [PATCH] [cli] do not export the contents of .inferconfig to INFER_ARGS Summary: Propagating the arguments read in .inferconfig shouldn't be necessary as they are parsed by each executable. There are corner cases where I think this diff could change the behaviour of infer (eg, .inferconfig redefines project-root and subsequent exes read a different .inferconfig thanks to the project-root in INFER_ARGS), but I don't think there are good use cases like that. Reviewed By: jberdine Differential Revision: D4475092 fbshipit-source-id: 5c020d0 --- infer/src/base/CommandLineOption.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/src/base/CommandLineOption.ml b/infer/src/base/CommandLineOption.ml index a823a21ec..98771c000 100644 --- a/infer/src/base/CommandLineOption.ml +++ b/infer/src/base/CommandLineOption.ml @@ -776,7 +776,8 @@ let parse ?(incomplete=false) ?config_file ~usage action = args_to_export := arg_string in (* read .inferconfig first, then env vars, then command-line options *) parse_args ~incomplete ~usage (Infer Driver) inferconfig_args |> ignore; - if not incomplete then add_parsed_args_to_args_to_export (); + (* NOTE: do not add the contents of .inferconfig to INFER_ARGS. This helps avoid hitting the + command line size limit. *) parse_args ~incomplete ~usage (Infer Driver) env_args |> ignore; if not incomplete then add_parsed_args_to_args_to_export (); let curr_usage =