From 068622ce1b8c74acbf1d6a4df2eb19cf7f92022f Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 27 Jun 2017 08:21:03 -0700 Subject: [PATCH] [-notest] goodnight, sweet prince Summary: Rename historical option to its new form, since the old form was no longer accepted by infer. Reviewed By: martinoluca Differential Revision: D5329033 fbshipit-source-id: 4fa9402 --- infer/src/backend/printer.ml | 2 +- infer/src/base/Config.ml | 22 +++++++++++----------- infer/src/base/Config.mli | 2 +- infer/src/base/Logging.ml | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/infer/src/backend/printer.ml b/infer/src/backend/printer.ml index 2a17cf6ea..27a94577d 100644 --- a/infer/src/backend/printer.ml +++ b/infer/src/backend/printer.ml @@ -384,7 +384,7 @@ let node_start_session node session = (** Finish a session, and perform delayed print actions if required *) let node_finish_session node = - if not Config.test then force_delayed_prints () + if not Config.only_cheap_debug then force_delayed_prints () else L.reset_delayed_prints (); if Config.write_html then begin F.fprintf !curr_html_formatter "%a" diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 3f1a78bc6..f52cf8eda 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -797,12 +797,12 @@ and ( filtering, frontend_tests, linters_developer_mode, + only_cheap_debug, print_buckets, print_logs, print_types, reports_include_ml_loc, stats, - test, trace_error, write_html, write_dotty @@ -847,6 +847,11 @@ and ( "Do not show the results from experimental checks (note: some of them may contain many false \ alarms)" + and only_cheap_debug = + CLOpt.mk_bool ~long:"only-cheap-debug" + ~default:true + "Disable expensive debugging output" + and print_buckets = CLOpt.mk_bool ~long:"print-buckets" "Show the internal bucket of Infer reports in their textual description" @@ -859,11 +864,6 @@ and ( CLOpt.mk_bool ~deprecated:["with_infer_src_loc"] ~long:"reports-include-ml-loc" "Include the location in the Infer source code from where reports are generated" - and test = - CLOpt.mk_bool ~long:"only-cheap-debug" - ~default:true - "Disable expensive debugging output" - and trace_error = CLOpt.mk_bool ~long:"trace-error" "Detailed tracing information during error explanation" @@ -887,12 +887,12 @@ and ( CLOpt.mk_bool_group ~deprecated:["debug"] ~long:"debug" ~short:'g' ~in_help:all_generic_manuals "Debug mode (also sets $(b,--debug-level 2), $(b,--developer-mode), $(b,--no-filtering), \ - $(b,--print-buckets), $(b,--print-types), $(b,--reports-include-ml-loc), $(b,--no-test), \ - $(b,--trace-error), $(b,--write-dotty), $(b,--write-html))" + $(b,--print-buckets), $(b,--print-types), $(b,--reports-include-ml-loc), \ + $(b,--no-only-cheap-debug), $(b,--trace-error), $(b,--write-dotty), $(b,--write-html))" ~f:(fun debug -> if debug then set_debug_level 2 else set_debug_level 0; debug) [developer_mode; print_buckets; print_types; reports_include_ml_loc; trace_error; write_html; write_dotty] - [filtering; test] + [filtering; only_cheap_debug] and _ : int option ref = CLOpt.mk_int_opt ~long:"debug-level" @@ -957,12 +957,12 @@ and ( filtering, frontend_tests, linters_developer_mode, + only_cheap_debug, print_buckets, print_logs, print_types, reports_include_ml_loc, stats, - test, trace_error, write_html, write_dotty @@ -1946,6 +1946,7 @@ and nelseg = !nelseg and suggest_nullable = !suggest_nullable and no_translate_libs = not !headers and objc_memory_model_on = !objc_memory_model +and only_cheap_debug = !only_cheap_debug and only_footprint = !only_footprint and passthroughs = !passthroughs and patterns_never_returning_null = match patterns_never_returning_null with (k,r) -> (k,!r) @@ -2003,7 +2004,6 @@ and stats_report = !stats_report and subtype_multirange = !subtype_multirange and svg = !svg and symops_per_iteration = !symops_per_iteration -and test = !test and test_filtering = !test_filtering and testing_mode = !testing_mode and threadsafety = !threadsafety diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 36d2c4b58..32ec1eeb4 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -295,6 +295,7 @@ val monitor_prop_size : bool val nelseg : bool val no_translate_libs : bool val objc_memory_model_on : bool +val only_cheap_debug : bool val only_footprint : bool val pmd_xml : bool val precondition_stats : bool @@ -346,7 +347,6 @@ val subtype_multirange : bool val suggest_nullable: bool val svg : bool val symops_per_iteration : int option -val test : bool val test_filtering : bool val testing_mode : bool val threadsafety : bool diff --git a/infer/src/base/Logging.ml b/infer/src/base/Logging.ml index 7b2955b15..7c7c2811a 100644 --- a/infer/src/base/Logging.ml +++ b/infer/src/base/Logging.ml @@ -342,7 +342,7 @@ let printer_hook = ref (fun _ -> failwith "uninitialized printer hook") (** extend the current print log *) let add_print_action pact = if Config.write_html then delayed_actions := pact :: !delayed_actions - else if not Config.test then !printer_hook (fst !log_file) pact + else if not Config.only_cheap_debug then !printer_hook (fst !log_file) pact (** reset the delayed print actions *) let reset_delayed_prints () =