Commit 6684709
Migrate deprecated_terse_writes from thrift_cpp2_options to field-level @cpp.DeprecatedTerseWrite (#538)
Summary:
Pull Request resolved: #538
The `deprecated_terse_writes` option in `thrift_cpp2_options` applies globally to all fields. This diff migrates the behavior to per-field `cpp.DeprecatedTerseWrite` structured annotations, which is the preferred approach.
Changes to the carbon compiler (`cppgen.py` and `targets.py`):
- Add `cpp.DeprecatedTerseWrite` annotation to each non-optional, non-structured-type field in generated `.thrift` files
- Remove `deprecated_terse_writes` from `thrift_cpp2_options` in generated `BUCK` files
- Skip the annotation for structured types (structs, unions, exceptions) since `cpp.DeprecatedTerseWrite` is not supported on them
All 28 IDL files regenerated.
Reviewed By: vitaut
Differential Revision: D97542094
fbshipit-source-id: fd0684d2f9ca69e793ed2ef9628e070ec7e15a141 parent b7927a1 commit 6684709
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
55 | 60 | | |
| 61 | + | |
56 | 62 | | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| 75 | + | |
68 | 76 | | |
| 77 | + | |
69 | 78 | | |
| 79 | + | |
70 | 80 | | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
| |||
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
| 92 | + | |
81 | 93 | | |
| 94 | + | |
82 | 95 | | |
| 96 | + | |
83 | 97 | | |
| 98 | + | |
84 | 99 | | |
| 100 | + | |
85 | 101 | | |
86 | 102 | | |
87 | 103 | | |
| |||
92 | 108 | | |
93 | 109 | | |
94 | 110 | | |
| 111 | + | |
95 | 112 | | |
| 113 | + | |
96 | 114 | | |
97 | 115 | | |
98 | 116 | | |
| |||
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| 124 | + | |
106 | 125 | | |
| 126 | + | |
107 | 127 | | |
| 128 | + | |
108 | 129 | | |
| 130 | + | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
0 commit comments