thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-4661) Rust enum name wrong case in generated structs
Date Fri, 09 Nov 2018 15:59:00 GMT

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

ASF GitHub Bot commented on THRIFT-4661:
----------------------------------------

jeking3 commented on issue #1623: THRIFT-4661: Rust enum name wrong case in generated structs
URL: https://github.com/apache/thrift/pull/1623#issuecomment-437404329
 
 
   On the CL missing file my assumption was it is a race inside the cl build framework.  It
has plagued the project since CL was added.  If you can smite that, it would help stabilize
the builds.  The other issue I have seen is a less frequent ssl/socket issue in the dlang
tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Rust enum name wrong case in generated structs
> ----------------------------------------------
>
>                 Key: THRIFT-4661
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4661
>             Project: Thrift
>          Issue Type: Bug
>          Components: Rust - Compiler
>    Affects Versions: 0.11.0
>         Environment: C:\Users\jake>rustup show
> Default host: x86_64-pc-windows-msvc
> stable-x86_64-pc-windows-msvc (default)
> rustc 1.30.0 (da5f414c2 2018-10-24)
>            Reporter: J W
>            Assignee: Allen George
>            Priority: Major
>
> *For this thrift (note lowercase "e" at beginning of enum name):*
> enum ePlatform
> { None = 0 }
> struct SettingItem
> { 1: ePlatform platform }
> *Generated with:*
> thrift -gen rs -out ../rust/thrift/src enum_lowercase_prefix.thrift
> *Generated Rust fails to compile:*
> error[E0412]: cannot find type `ePlatform` in this scope
>  --> src\enum_lowercase_prefix.rs:71:24
>  
> 71 | pub platform: Option<ePlatform>,
> |^^^^^^^^^ did you mean `EPlatform`?|
>  
> *In t_rs_generator.cc line 3025:*
> return rust_namespace(ttype) + ttype->get_name();
> *To match behavior in generate_enum(), probably needs to be:*
> return rust_namespace(ttype) + rust_camel_case(ttype->get_name());



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message