From cbb8810e2cc970f896a9a86aa8677617fcc02537 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 4 Feb 2016 06:47:09 -0800 Subject: [PATCH] make dotty field optional in json Summary: public The "dotty" field in json reports is only used when reporting retain cycles. It makes sense not to emit it by default (when it's `None`). Reviewed By: akotulski Differential Revision: D2891320 fb-gh-sync-id: 54292a9 --- infer/src/backend/inferprint.ml | 3 +-- infer/src/backend/jsonbug.atd | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/infer/src/backend/inferprint.ml b/infer/src/backend/inferprint.ml index 666a4a15c..9f98a8c7b 100644 --- a/infer/src/backend/inferprint.ml +++ b/infer/src/backend/inferprint.ml @@ -188,8 +188,7 @@ let error_desc_to_plain_string error_desc = pp_to_string pp () let error_desc_to_dotty_string error_desc = - let dotty_opt = Localise.error_desc_get_dotty error_desc in - match dotty_opt with Some s -> s | None -> "" + Localise.error_desc_get_dotty error_desc let error_desc_to_xml_string error_desc = let pp fmt () = F.fprintf fmt "%a" Localise.pp_error_desc error_desc in diff --git a/infer/src/backend/jsonbug.atd b/infer/src/backend/jsonbug.atd index 652eb8e73..5b95d06cd 100644 --- a/infer/src/backend/jsonbug.atd +++ b/infer/src/backend/jsonbug.atd @@ -31,7 +31,7 @@ type jsonbug = { key : int; qualifier_tags : tag_value_record list; hash : int; - dotty : string; + ?dotty : string option; ?infer_source_loc: loc option; }