[racerd] reduce size of IssueAuxData

Reviewed By: jvillard

Differential Revision: D13505031

fbshipit-source-id: 90f1974a7
master
Nikos Gorogiannis 6 years ago committed by Facebook Github Bot
parent 397f4a1973
commit 2d2d861686

@ -45,7 +45,7 @@ let dedup (issues : Jsonbug_t.jsonbug list) =
~f:(fun (reported_ends, nondup_issues) (issue : Jsonbug_t.jsonbug) -> ~f:(fun (reported_ends, nondup_issues) (issue : Jsonbug_t.jsonbug) ->
match issue.access with match issue.access with
| Some encoded -> | Some encoded ->
let _, _, end_locs = IssueAuxData.decode encoded in let end_locs = IssueAuxData.decode encoded in
if is_duplicate_report end_locs reported_ends then (reported_ends, nondup_issues) if is_duplicate_report end_locs reported_ends then (reported_ends, nondup_issues)
else (LocListSet.add reported_ends end_locs, {issue with access= None} :: nondup_issues) else (LocListSet.add reported_ends end_locs, {issue with access= None} :: nondup_issues)
| None -> | None ->

@ -7,7 +7,7 @@
open! IStd open! IStd
type t = Typ.Procname.t * RacerDDomain.TraceElem.t * Location.t list type t = Location.t list
let encode decoded = B64.encode (Marshal.to_string decoded []) let encode decoded = B64.encode (Marshal.to_string decoded [])

@ -7,7 +7,7 @@
open! IStd open! IStd
type t = Typ.Procname.t * RacerDDomain.TraceElem.t * Location.t list type t = Location.t list
val encode : t -> string val encode : t -> string

@ -885,7 +885,7 @@ let report_thread_safety_violation tenv pdesc ~make_description ~report_kind acc
let issue_type, explanation = get_reporting_explanation report_kind tenv pname thread in let issue_type, explanation = get_reporting_explanation report_kind tenv pname thread in
let error_message = F.sprintf "%s%s" description explanation in let error_message = F.sprintf "%s%s" description explanation in
let end_locs = Option.to_list original_end @ Option.to_list conflict_end in let end_locs = Option.to_list original_end @ Option.to_list conflict_end in
let access = IssueAuxData.encode (pname, access, end_locs) in let access = IssueAuxData.encode end_locs in
log_issue pname ~loc ~ltr ~access issue_type error_message log_issue pname ~loc ~ltr ~access issue_type error_message
in in
let trace_of_pname = trace_of_pname access pdesc in let trace_of_pname = trace_of_pname access pdesc in

Loading…
Cancel
Save