[config] Remove unnecessary --models

Summary:
Only the python code passes --models, always does so, and only ever
passes Config.models_jar.

Reviewed By: jeremydubreil

Differential Revision: D4151094

fbshipit-source-id: 8f21c03
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent 2485491e93
commit 3021394a10

@ -323,9 +323,6 @@ class AnalyzerWithFrontendWrapper(analyze.AnalyzerWrapper):
'-suppress_warnings_out', self.javac.suppress_warnings_out,
]
if os.path.isfile(config.MODELS_JAR):
infer_cmd += ['-models', config.MODELS_JAR]
if self.args.debug:
infer_cmd.append('-debug')
if self.args.analyzer == config.ANALYZER_TRACING:

@ -990,10 +990,6 @@ and ml_buckets =
- 'cpp' from C++ code"
~symbols:ml_bucket_symbols
and models_file =
CLOpt.mk_path_opt ~deprecated:["models"] ~long:"models"
~exes:CLOpt.[Analyze;Java] ~meta:"jar file" "Specify a jar file containing the Java models"
and models_mode =
CLOpt.mk_bool ~deprecated:["models_mode"; "-models_mode"] ~long:"models-mode"
"Mode for analyzing the models"
@ -1452,7 +1448,6 @@ and load_analysis_results = !load_results
and makefile_cmdline = !makefile
and merge = !merge
and ml_buckets = !ml_buckets
and models_file = !models_file
and models_mode = !models_mode
and modified_targets = !modified_targets
and monitor_prop_size = !monitor_prop_size

@ -212,7 +212,6 @@ val makefile_cmdline : string
val merge : bool
val ml_buckets :
[ `MLeak_all | `MLeak_arc | `MLeak_cf | `MLeak_cpp | `MLeak_no_arc | `MLeak_unknown ] list
val models_file : string option
val models_mode : bool
val modified_targets : string option
val monitor_prop_size : bool

@ -80,17 +80,12 @@ let zip_libraries =
(* fname is a dir of specs *)
zip_libs in
IList.fold_left add_zip [] Config.specs_library in
let add_models file =
(mk_zip_lib true file) :: zip_libs in
match Config.models_file with
| _ when Config.checkers ->
zip_libs
| Some file ->
add_models file
| None when Sys.file_exists Config.models_jar ->
add_models Config.models_jar
| None ->
zip_libs
if Config.checkers then
zip_libs
else if Sys.file_exists Config.models_jar then
(mk_zip_lib true Config.models_jar) :: zip_libs
else
zip_libs
)
(* Search path in the list of zip libraries and use a cache directory to save already

@ -15,15 +15,15 @@ open Javalib_pack
module L = Logging
let () =
match Config.models_file with
| None when Config.models_mode ->
match Config.models_mode, Sys.file_exists Config.models_jar with
| true, false ->
()
| None ->
| false, false ->
failwith "Java model file is required"
| Some _ when Config.models_mode ->
failwith "Not expecting model file when analyzing the models";
| Some file ->
JClasspath.add_models file
| true, true ->
failwith "Not expecting model file when analyzing the models"
| false, true ->
JClasspath.add_models Config.models_jar
let register_perf_stats_report source_file =

Loading…
Cancel
Save