From 94b75585e5dce47e780fba03599c2d57ab9b7f8b Mon Sep 17 00:00:00 2001 From: Mitya Lyubarskiy Date: Mon, 20 Apr 2020 06:56:28 -0700 Subject: [PATCH] [nullsafe] x-plat friendly JSON data for nullsafe metainfo Summary: As artempyanykh pointed out, `nullable` works much better for required fields than `optional` in terms of x-plat. Reviewed By: artempyanykh Differential Revision: D21129614 fbshipit-source-id: b03c91b78 --- infer/src/atd/jsonbug.atd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/atd/jsonbug.atd b/infer/src/atd/jsonbug.atd index ef9c4d957..4bc6b56c3 100644 --- a/infer/src/atd/jsonbug.atd +++ b/infer/src/atd/jsonbug.atd @@ -25,12 +25,12 @@ type nullsafe_mode = [Default | LocalTrustAll | LocalTrustSome | LocalTrustNone type nullsafe_meta_issue_info = { num_issues: int; curr_nullsafe_mode: nullsafe_mode; - can_be_promoted_to: nullsafe_mode option (* If present, it implies that the class is not only free of issues, but the mode can be promoted to a stricter one *) + can_be_promoted_to: nullsafe_mode nullable (* If present, it implies that the class is not only free of issues, but the mode can be promoted to a stricter one *) } type nullsafe_extra = { class_name: string; - package: string option; + package: string nullable; ?meta_issue_info: nullsafe_meta_issue_info option (* Should be present if the issue is "nullsafe meta issue" *) }