[cleanup] use constant strings in `Config` for dir names

Summary: Also, stop trying to delete directories that do not exist: "sources" and "filelists".

Reviewed By: mbouaziz

Differential Revision: D5658089

fbshipit-source-id: e1cdb13
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 3da5908728
commit 8fd9d40ca8

@ -113,6 +113,8 @@ let captured_dir_name = "captured"
let clang_initializer_prefix = "__infer_globals_initializer_"
let classnames_dir_name = "classnames"
(** Experimental: if true do some specialized analysis of concurrent constructs. *)
let csl_analysis = true

@ -101,6 +101,8 @@ val captured_dir_name : string
val clang_initializer_prefix : string
val classnames_dir_name : string
val classpath : string option
val cpp_extra_include_dir : string

@ -132,13 +132,12 @@ let clean_results_dir () =
(* In Buck flavors mode we keep all capture data, but in Java mode we keep only the tenv *)
let should_delete_dir =
let dirs_to_delete =
"backend_stats"
:: "classnames"
:: "filelists"
:: "frontend_stats"
:: "multicore"
:: "reporting_stats"
:: "sources" :: (if Config.flavors then [] else ["attributes"])
let open Config in
backend_stats_dir_name
:: classnames_dir_name
:: frontend_stats_dir_name
:: multicore_dir_name
:: reporting_stats_dir_name :: (if Config.flavors then [] else [attributes_dir_name])
in
List.mem ~equal:String.equal dirs_to_delete
in

@ -107,7 +107,7 @@ let add_cmethod source_file program linereader icfg cm proc_name =
add_edges context start_node exn_node [exit_node] method_body_nodes jbir_code false
let path_of_cached_classname cn =
let root_path = Filename.concat Config.results_dir "classnames" in
let root_path = Config.(results_dir ^/ classnames_dir_name) in
let package_path = List.fold ~f:Filename.concat ~init:root_path (JBasics.cn_package cn) in
Filename.concat package_path (JBasics.cn_simple_name cn ^ ".java")

Loading…
Cancel
Save