From 59f09ef697b137e886f5efe035a1e96fb78c550a Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 13 Aug 2018 05:42:32 -0700 Subject: [PATCH] [opam] upgrade atdgen to version 2 Summary: To keep up with the times. Changes consist of new features and moving modules around so shouldn't change anything on our side. Depends on D9239803 The controller you requested could not be found.: facebook-clang-plugins Reviewed By: da319 Differential Revision: D9239817 fbshipit-source-id: d02a2076a --- facebook-clang-plugins | 2 +- infer/src/backend/crashcontext.ml | 6 ++++-- infer/src/base/RunState.ml | 2 +- infer/src/checkers/BoundedCallTree.ml | 2 +- infer/src/clang/Capture.ml | 6 ++++-- infer/src/clang/ClangPointers.ml | 2 +- infer/src/java/JavaProfilerSamples.ml | 2 +- opam | 2 +- opam.lock | 5 +++-- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/facebook-clang-plugins b/facebook-clang-plugins index 4c1ba5051..2348f2ae2 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit 4c1ba505123398d1bfb81fca198cafabffa84da9 +Subproject commit 2348f2ae27ea36322b3f5efacb83a11b318be844 diff --git a/infer/src/backend/crashcontext.ml b/infer/src/backend/crashcontext.ml index cc06a78bf..6c075f814 100644 --- a/infer/src/backend/crashcontext.ml +++ b/infer/src/backend/crashcontext.ml @@ -47,7 +47,9 @@ let stracktree_of_frame frame = (** k = 1 implementation, where k is the number of levels of calls inlined *) let stitch_summaries stacktrace_file summary_files out_file = let stacktrace = Stacktrace.of_json_file stacktrace_file in - let summaries = List.map ~f:(Ag_util.Json.from_file Stacktree_j.read_stacktree) summary_files in + let summaries = + List.map ~f:(Atdgen_runtime.Util.Json.from_file Stacktree_j.read_stacktree) summary_files + in let summary_map = List.fold ~f:(fun acc stacktree -> @@ -63,7 +65,7 @@ let stitch_summaries stacktrace_file summary_files out_file = in let expanded_frames = List.map ~f:expand_stack_frame stacktrace.frames in let crashcontext = {Stacktree_j.stack= expanded_frames} in - Ag_util.Json.to_file Stacktree_j.write_crashcontext_t out_file crashcontext + Atdgen_runtime.Util.Json.to_file Stacktree_j.write_crashcontext_t out_file crashcontext let collect_all_summaries root_summaries_dir stacktrace_file stacktraces_dir = diff --git a/infer/src/base/RunState.ml b/infer/src/base/RunState.ml index 28945a358..2d41f671b 100644 --- a/infer/src/base/RunState.ml +++ b/infer/src/base/RunState.ml @@ -53,7 +53,7 @@ let load_and_validate () = if Sys.file_exists state_file_path <> `Yes then error "save state not found: '%s' does not exist" state_file_path else - match Ag_util.Json.from_file Runstate_j.read_t state_file_path with + match Atdgen_runtime.Util.Json.from_file Runstate_j.read_t state_file_path with | {Runstate_t.results_dir_format} as loaded_state when String.equal !state.Runstate_t.results_dir_format results_dir_format -> state := loaded_state ; diff --git a/infer/src/checkers/BoundedCallTree.ml b/infer/src/checkers/BoundedCallTree.ml index 38f3fec2b..4593076e0 100644 --- a/infer/src/checkers/BoundedCallTree.ml +++ b/infer/src/checkers/BoundedCallTree.ml @@ -91,7 +91,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let fname = F.sprintf "%s.%s.json" (Typ.Procname.to_filename caller) suffix in let fpath = Filename.concat dir fname in Utils.create_dir dir ; - Ag_util.Json.to_file Stacktree_j.write_stacktree fpath stacktree + Atdgen_runtime.Util.Json.to_file Stacktree_j.write_stacktree fpath stacktree let exec_instr astate proc_data _ = function diff --git a/infer/src/clang/Capture.ml b/infer/src/clang/Capture.ml index acd23052a..fdac132ff 100644 --- a/infer/src/clang/Capture.ml +++ b/infer/src/clang/Capture.ml @@ -13,11 +13,13 @@ let debug_mode = Config.debug_mode || Config.frontend_stats (** This function reads the json file in fname, validates it, and encodes in the AST data structure defined in Clang_ast_t. *) let validate_decl_from_file fname = - Ag_util.Biniou.from_file ~len:CFrontend_config.biniou_buffer_size Clang_ast_b.read_decl fname + Atdgen_runtime.Util.Biniou.from_file ~len:CFrontend_config.biniou_buffer_size + Clang_ast_b.read_decl fname let validate_decl_from_channel chan = - Ag_util.Biniou.from_channel ~len:CFrontend_config.biniou_buffer_size Clang_ast_b.read_decl chan + Atdgen_runtime.Util.Biniou.from_channel ~len:CFrontend_config.biniou_buffer_size + Clang_ast_b.read_decl chan let register_perf_stats_report source_file = diff --git a/infer/src/clang/ClangPointers.ml b/infer/src/clang/ClangPointers.ml index 05ec93666..6715d50f5 100644 --- a/infer/src/clang/ClangPointers.ml +++ b/infer/src/clang/ClangPointers.ml @@ -32,7 +32,7 @@ let visit_ast ?(visit_decl= empty_v) ?(visit_stmt= empty_v) ?(visit_type= empty_ | Some error -> L.(die InternalError) "visiting the clang AST failed with error %s" - (Ag_util.Validation.string_of_error error) + (Atdgen_runtime.Util.Validation.string_of_error error) let get_ptr_from_node node = diff --git a/infer/src/java/JavaProfilerSamples.ml b/infer/src/java/JavaProfilerSamples.ml index 611710e38..e03304164 100644 --- a/infer/src/java/JavaProfilerSamples.ml +++ b/infer/src/java/JavaProfilerSamples.ml @@ -306,5 +306,5 @@ let from_json_string str ~use_signature = let from_json_file file ~use_signature = from_java_profiler_samples - (Ag_util.Json.from_file Java_profiler_samples_j.read_java_profiler_samples file) + (Atdgen_runtime.Util.Json.from_file Java_profiler_samples_j.read_java_profiler_samples file) ~use_signature diff --git a/opam b/opam index 65598f781..20d45a624 100644 --- a/opam +++ b/opam @@ -28,7 +28,7 @@ ocaml-version: [ >= "4.04.2" ] depends: [ "ANSITerminal" {>="0.7"} "apron" - "atdgen" {>="1.6.0" & <"1.13.0"} + "atdgen" {>="2.0.0"} "base64" "cmdliner" {>="1.0.0"} "core" diff --git a/opam.lock b/opam.lock index 8b596decb..ec3ec7a6e 100644 --- a/opam.lock +++ b/opam.lock @@ -1,7 +1,8 @@ ANSITerminal = 0.8 apron = 20160125 -atd = 1.12.0 -atdgen = 1.12.0 +atd = 2.0.0 +atdgen = 2.0.0 +atdgen-runtime = 2.0.0 base = v0.11.0 base64 = 2.2.0 bin_prot = v0.11.0