From 1e478b235ace0f19fe966f6a0d9753160b24d0f5 Mon Sep 17 00:00:00 2001 From: Pranav Thulasiram Bhat Date: Fri, 20 Sep 2024 16:06:18 -0700 Subject: [PATCH] Introduce new annotation to skip fields for py-deprecated Summary: The thrift-py-deprecated codegen (especially when the json option is turned-on) cannot deal with maps/sets with structured keys. Introduce a new (field-level) annotation to skip over problematic fields. The next diff will modify the compiler to acutlaly skip over annotated fields. Reviewed By: Filip-F Differential Revision: D62617627 fbshipit-source-id: 2b79a1d0e99de1cc497a7cf8aed9574e55e2d085 --- thrift/annotation/python.thrift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/thrift/annotation/python.thrift b/thrift/annotation/python.thrift index e848d0609fb8a..05209b8d136ee 100644 --- a/thrift/annotation/python.thrift +++ b/thrift/annotation/python.thrift @@ -30,6 +30,12 @@ namespace py thrift.annotation.python @scope.Definition struct Py3Hidden {} +/// Hides in thrift-py-deprecated only +@scope.Field +struct PyDeprecatedHidden { + 1: string reason; +} + @scope.Enum struct Flags {}