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

Triton Circonflexe commented on THRIFT-5444:
--------------------------------------------

A .tbz2 is just a .tar.bz2 archive (7-zip should open it seamlessly but I can 
replace with a zip if you want).
It contains a minimal example, the generated code that fails to compile and the 
fixed code (at least a possible fix).

Looking at the history, I found THRIFT-5091 and I was wondering what is the 
rationale for "_result" and "_args" replacements?
Is it linked to some internals of Thrift or some constraints on .NET Standard 
(like {{GetType()}} which is reserved in C#)?

> 'netstd' generator incorrectly generate usage of enums named 
> "<something>_result"
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-5444
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5444
>             Project: Thrift
>          Issue Type: Bug
>          Components: netstd - Compiler
>    Affects Versions: 0.14.2
>            Reporter: Triton Circonflexe
>            Priority: Major
>         Attachments: enum_result.tbz2
>
>
> When the .thrift files contains an enumeration whose name contains "_result", 
> the generated code contains "Result" except in the definition of the enum 
> itself, preventing the code from compiling successfully.
> Since other enumerations are generated preserving the case and underscores, I 
> believe the issue lies on the usage side and not definition.
> Provided example (generated with {{netstd:no_deepcopy}}) shows the case where 
> the enum in used as a return value but the issue is the same when used as 
> parameter or inside a struct.
> I observed this issue with the current HEAD and checked that it already 
> existed in 0.14.2.
> I will take a look and try to propose a patch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to