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

Kevin Wooten commented on THRIFT-3401:
--------------------------------------

That's exactly what I keyed on and how I verified the issue and confirmed its 
fix.

I can only assume that if falls on me.  It must be that after fixing another 
issue I didn't rerun the tests with ThriftTest.  

It actually raised a question in my mind of how do we get ObjC & Swift tests 
into the build?  

In my attempt to test against python and c++ I ran into a few inconsistencies 
that would break the build (e.g. different values returned from methods in 
ThriftTest interface).  I just assumed I was doing it wrong and corrected them 
as necessary to execute my tests.  Now would be a good time to integrate ObjC & 
Swift into the full build and ensure it's properly tested at all times.


> Nested collections emit Objective-C code that cannot compile
> ------------------------------------------------------------
>
>                 Key: THRIFT-3401
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3401
>             Project: Thrift
>          Issue Type: Bug
>          Components: Cocoa - Compiler
>    Affects Versions: 1.0
>         Environment: OS X 10.9 and 10.10
>            Reporter: Steve Yegge
>            Assignee: Kevin Wooten
>            Priority: Critical
>             Fix For: 1.0
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Nested Thrift collections produce nested generics in Objective-C.  
> Unfortunately, Objective-C generics do not appear to support type nesting.
> For instance,
>   1: list<list<string>> foo
> generates an Objective-C declaration like this
>   @property (strong, nonatomic) NSMutableArray<NSArray<NSString *>> * foo;
> which results in an XCode compile error:  Type argument 'NSArray<NSString *>' 
> is neither an Objective-C object nor a block type
> The only workaround is to edit the generated code to remove the nested type 
> specifiers.
> Until Objective-C supports nesting generic types, the Thrift cocoa compiler 
> should limit the type nesting to at most one level -- NSMutableArray<NSArray> 
> is legal, for instance.  Alternately, an easier solution might be to add a 
> flag that disables the generation of generic types for cocoa.



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

Reply via email to