Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-640

Support deprecation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • Java - Compiler
    • None
    • Patch Available

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              wolfda@gmail.com Daniel Wolf
              marz Nathan Marz
              Votes:
              10 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: