Commit fa5bab3
Add @thrift.Deprecated annotation definition
Summary:
`thrift.Deprecated` is a structured annotation that can be applied to various Thrift definitions, to mark them as deprecated in their target language. This diff initially focusses on field access, to mark certain fields as "don't use anymore", in the migration period before they can be deleted.
When applied, code generators can emit language-specific deprecation markers (e.g., `[[deprecated]]` in C++, `Deprecated` in Java) that produce compiler warnings when deprecated elements are used. The annotation includes an optional `message` field to explain why the element is deprecated and what to use instead, e.g:
```thrift
struct User {
thrift.Deprecated{message = "Use 'full_name' instead"}
1: string name;
2: string full_name;
}
```
## Devnote
The fixture tests are empty, so each subsequent commit indicates what the changes are for each language.
Reviewed By: praihan
Differential Revision: D92099551
fbshipit-source-id: fcbdbe6fcd82c8551aa8edc25df8a8c489c9a6cb1 parent 6c423b3 commit fa5bab3
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
0 commit comments