You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (JIRA)" <ji...@apache.org> on 2016/01/07 14:53:40 UTC

[jira] [Updated] (THRIFT-640) Support deprecation

     [ https://issues.apache.org/jira/browse/THRIFT-640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell updated THRIFT-640:
--------------------------------
    Fix Version/s: 0.9.4

> Support deprecation
> -------------------
>
>                 Key: THRIFT-640
>                 URL: https://issues.apache.org/jira/browse/THRIFT-640
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Java - Compiler
>            Reporter: Nathan Marz
>            Priority: Minor
>             Fix For: 0.9.4
>
>         Attachments: thrift-640-java-deprecation.patch
>
>
> Sometimes we do schema migrations and it would be cool to be able to have deprecation functionality from Thrift. At the most basic level, we should be able to annotate a field as deprecated and have the compiler generate "@Deprecated" annotations in the Java code.
> Sometimes though, you may want creators of structs to be forced to use new fields, but you still want to be able to read the old fields until you have everything migrated over. In this case you could mark a field as "strong-deprecated" and just not generate any setters for those fields (only getters). This would force all users of the struct to migrate to new schema, since the code won't compile otherwise.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)