Skip to content

Commit

Permalink
[dbwriter] split implementation into module
Browse files Browse the repository at this point in the history
Reviewed By: jvillard

Differential Revision:
D68217364

Privacy Context Container: L1208441

fbshipit-source-id: d2228f0b32a97c0bccd8a607cc8c88b195be8e83
  • Loading branch information
ngorogiannis authored and facebook-github-bot committed Jan 17, 2025
1 parent 6d866dd commit 4db8bc0
Show file tree
Hide file tree
Showing 9 changed files with 916 additions and 791 deletions.
1 change: 1 addition & 0 deletions infer/src/backend/Summary.ml
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,5 @@ module OnDisk = struct
let report_summary = ReportSummary.of_err_log proc_name err_log in
DBWriter.update_report_summary ~proc_uid:(Procname.to_unique_id proc_name)
~merge_report_summary:(ReportSummary.SQLite.serialize report_summary)
()
end
747 changes: 13 additions & 734 deletions infer/src/base/DBWriter.ml

Large diffs are not rendered by default.

57 changes: 1 addition & 56 deletions infer/src/base/DBWriter.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,4 @@

open! IStd

val override_use_daemon : bool -> unit
(** override the default of whether the process should use DB daemon [true] or not [false] *)

val add_source_file :
source_file:Sqlite3.Data.t
-> tenv:Sqlite3.Data.t
-> integer_type_widths:Sqlite3.Data.t
-> proc_names:Sqlite3.Data.t
-> unit

val canonicalize : unit -> unit
(** put the **capture** database on disk in deterministic form *)

val delete_all_specs : unit -> unit

val delete_attributes : proc_uid:string -> unit

val delete_issue_logs : source_file:Sqlite3.Data.t -> unit

val delete_specs : proc_uids:string list -> unit

val mark_all_source_files_stale : unit -> unit

val merge_captures : root:string -> infer_deps_file:string -> unit

val merge_summaries : infer_outs:string list -> unit

val replace_attributes :
proc_uid:string
-> proc_attributes:Sqlite3.Data.t
-> cfg:Sqlite3.Data.t
-> callees:Sqlite3.Data.t
-> analysis:bool
-> unit

val shrink_analysis_db : unit -> unit
(** Delete all analysis summaries (by overwriting with [NULL]) and [VACUUM]ing. *)

val start : unit -> unit

val store_issue_log :
checker:string -> source_file:Sqlite3.Data.t -> issue_log:Sqlite3.Data.t -> unit

val store_spec :
AnalysisRequest.t
-> proc_uid:string
-> proc_name:Sqlite3.Data.t
-> merge_pulse_payload:(old_pulse_payload:Sqlite3.Data.t option -> Sqlite3.Data.t list)
-> merge_report_summary:(old_report_summary:Sqlite3.Data.t option -> Sqlite3.Data.t)
-> merge_summary_metadata:(old_summary_metadata:Sqlite3.Data.t option -> Sqlite3.Data.t)
-> unit

val update_report_summary :
proc_uid:string
-> merge_report_summary:(old_report_summary:Sqlite3.Data.t option -> Sqlite3.Data.t)
-> unit
include DBWriterS.S
Loading

0 comments on commit 4db8bc0

Please sign in to comment.