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

2024-04-25 Thread Jens Geyer (Jira)


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

Jens Geyer commented on THRIFT-640:
---

[Example of how it works can be found in 
optional_required_default.thrift|https://github.com/apache/thrift/blob/master/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/optional_required_default.thrift]

> 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
>Assignee: Daniel Wolf
>Priority: Minor
> Fix For: 0.10.0
>
> 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
(v8.20.10#820010)


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

2016-03-19 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-640:
---

SUCCESS: Integrated in Thrift-precommit #335 (See 
[https://builds.apache.org/job/Thrift-precommit/335/])
THRIFT-640 Support deprecation (nsuke: 
[https://github.com/apache/thrift/commit/0d12de3b27115dfd8246102320e97d77bc596945])
* compiler/cpp/src/generate/t_java_generator.cc
follow-up: THRIFT-640 Fix indent in generated code (nsuke: 
[https://github.com/apache/thrift/commit/e831490db9ca3c0539ffadb55cbb20967c7c4fbd])
* compiler/cpp/src/generate/t_java_generator.cc


> 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
>Assignee: Daniel Wolf
>Priority: Minor
> Fix For: 0.10.0
>
> 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)


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

2015-12-02 Thread Karan Sewani (JIRA)

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

Karan Sewani commented on THRIFT-640:
-

hi

would this feature be available?

regards
karan

> 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
>
> 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)