From 0fb75200dbbd2892ca2c9b4f83d30c883e6aa7ac Mon Sep 17 00:00:00 2001 From: Martin Trojer Date: Wed, 11 Dec 2024 01:01:03 -0800 Subject: [PATCH] fix scuba deadcode Reviewed By: ngorogiannis Differential Revision: D67079855 fbshipit-source-id: 30faaddab35f0ea7fb7f7248571398774b0a1817 --- infer/man/man1/infer-full.txt | 19 ++++++++++--------- infer/src/base/Config.ml | 22 +++++++--------------- infer/src/base/Config.mli | 8 -------- infer/src/base/LogEntry.ml | 2 -- infer/src/base/LogEntry.mli | 2 -- infer/src/base/StatsSample.ml | 5 ----- infer/src/base/StatsSample.mli | 4 ---- 7 files changed, 17 insertions(+), 45 deletions(-) diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index 445132f2cd2..d63d2ed28a6 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -2758,10 +2758,6 @@ INTERNAL OPTIONS --debug-level-reset Cancel the effect of --debug-level. - --[DEPRECATED] scuba-logging - Activates: (direct) logging to scuba (Conversely: - --no-[DEPRECATED] scuba-logging) - --developer-mode Activates: Show internal exceptions (Conversely: --no-developer-mode) @@ -3353,18 +3349,23 @@ INTERNAL OPTIONS --scuba-execution-id int64 - [DEPRECATED] Execution ID attached to all samples logged to scuba + [DOES NOTHING] Execution ID attached to all samples logged to + scuba --scuba-execution-id-reset Cancel the effect of --scuba-execution-id. + --scuba-logging + Activates: [DOES NOTHING] (direct) logging to scuba (Conversely: + --no-scuba-logging) + --scuba-normal +key=value - [DEPRECATED] add an extra string (normal) field to be set for each - sample of scuba, format = + [DOES NOTHING] add an extra string (normal) field to be set for + each sample of scuba, format = --scuba-tags +key=value - [DEPRECATED] add an extra set of strings (tagset) field to be set - for each sample of scuba, format + [DOES NOTHING] add an extra set of strings (tagset) field to be + set for each sample of scuba, format =(,,|NONE) --select-reset diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 2930b1f685f..5312ffdb568 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -3241,22 +3241,22 @@ and scope_leakage_config = |} -and scuba_execution_id = +and _scuba_execution_id = CLOpt.mk_int64_opt ~long:"scuba-execution-id" - "[DEPRECATED] Execution ID attached to all samples logged to scuba" + "[DOES NOTHING] Execution ID attached to all samples logged to scuba" -and scuba_logging = CLOpt.mk_bool ~long:"[DEPRECATED] scuba-logging" "(direct) logging to scuba" +and _scuba_logging = CLOpt.mk_bool ~long:"scuba-logging" "[DOES NOTHING] (direct) logging to scuba" -and scuba_normals = +and _scuba_normals = CLOpt.mk_string_map ~long:"scuba-normal" - "[DEPRECATED] add an extra string (normal) field to be set for each sample of scuba, format \ + "[DOES NOTHING] add an extra string (normal) field to be set for each sample of scuba, format \ =" -and scuba_tags = +and _scuba_tags = CLOpt.mk_string_map ~long:"scuba-tags" - "[DEPRECATED] add an extra set of strings (tagset) field to be set for each sample of scuba, \ + "[DOES NOTHING] add an extra set of strings (tagset) field to be set for each sample of scuba, \ format =(,,|NONE)" @@ -4760,14 +4760,6 @@ and scheduler = !scheduler and scope_leakage_config = !scope_leakage_config -and scuba_execution_id = !scuba_execution_id - -and scuba_logging = !scuba_logging - -and scuba_normals = !scuba_normals - -and scuba_tags = String.Map.map !scuba_tags ~f:(fun v -> String.split v ~on:',') - and select = match !select with | None -> diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index fa7dcd0cf43..ded40d535af 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -815,14 +815,6 @@ val scheduler : scheduler val scope_leakage_config : Yojson.Safe.t -val scuba_execution_id : Int64.t option - -val scuba_logging : bool - -val scuba_normals : string String.Map.t - -val scuba_tags : string list String.Map.t - val select : [`All | `Select of int] option val show_buckets : bool diff --git a/infer/src/base/LogEntry.ml b/infer/src/base/LogEntry.ml index 2ec7124e48f..b2caa54f334 100644 --- a/infer/src/base/LogEntry.ml +++ b/infer/src/base/LogEntry.ml @@ -40,5 +40,3 @@ let global_entry_log : t list ref = ref [] let global_log_get () = List.rev !global_entry_log let global_log_erase () = global_entry_log := [] - -let global_log_add entry = global_entry_log := entry :: !global_entry_log diff --git a/infer/src/base/LogEntry.mli b/infer/src/base/LogEntry.mli index 441c08aa4e1..f87e23b81d8 100644 --- a/infer/src/base/LogEntry.mli +++ b/infer/src/base/LogEntry.mli @@ -30,5 +30,3 @@ val mk_string : label:string -> message:string -> t val global_log_get : unit -> t list val global_log_erase : unit -> unit - -val global_log_add : t -> unit diff --git a/infer/src/base/StatsSample.ml b/infer/src/base/StatsSample.ml index c70ce3eae06..1beed6618b0 100644 --- a/infer/src/base/StatsSample.ml +++ b/infer/src/base/StatsSample.ml @@ -31,11 +31,6 @@ let add_normal ~name ~value sample = {sample with normal_section} -let add_tagset ~name ~value sample = - let tagset_section = SMap.add name value sample.tagset_section in - {sample with tagset_section} - - let sample_to_json sample = let map_to_assoc value_to_json key_value_map = let pairs = SMap.bindings key_value_map in diff --git a/infer/src/base/StatsSample.mli b/infer/src/base/StatsSample.mli index da8e094090e..903b7463a68 100644 --- a/infer/src/base/StatsSample.mli +++ b/infer/src/base/StatsSample.mli @@ -22,8 +22,4 @@ val add_normal : name:string -> value:string -> sample -> sample (** Set a new string field and its value to the sample. Overwrites if a field with this name was already set. *) -val add_tagset : name:string -> value:string list -> sample -> sample -(** Set a new set of strings field and its value to the sample. Overwrites if a field with this name - was already set. *) - val sample_to_json : sample -> Yojson.t