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

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

Github user apocolipse commented on the issue:

    https://github.com/apache/thrift/pull/1084
  
    @nsuke I considered that when starting out, however the differences between 
Swift 2 and 3 are pretty dramatic that makes shared code minimal (i.e. 
everything in this library is Value typed, compared to the Swift/Cocoa 
generator).
    Conceptually, this /is/ the `Swift` generator, and the other one is 
technically Cocoa Swift.
    Additionally, due to limitations with SPM, sharing code might not be the 
most sane option.
    One key difference with this and the existing Swift library, this library 
has no intention of Objective-C interop, it is a pure Swift approach.  
    
    We could argue for moving the old Swift generator to be used like `--gen 
cocoa:swift` which would be more appropriate in my opinion.
    
    As far as sharing code between them goes, the amount that is the same 
should be negligable, but packaging is the biggest concern.  Cocoapods isn't 
overly friendly with picking/choosing source files from different locations in 
the file heirarchy, and SPM isn't capable of pointing at sources not in 
`Sources` at all (hence the need for a separate repo for the time being to 
leverage it with SPM).


> Swift Library
> -------------
>
>                 Key: THRIFT-3773
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3773
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Swift - Library
>            Reporter: Thomas Bartelmess
>
> We already have the option to generate Swift code in the Cocoa compiler, 
> however large parts of the (Objective-C) Cocoa Library still depend on Cocoa 
> and  Objective-C.
> It would be good to have a native Swift library that doesn't depend on the 
> Cocoa libraries.
> Design goals:
> - Fully compatible with the code that is currently generated by the Cocoa 
> compiler (both Objective-C and Swift).
> - Ability to run on Linux
> - Pure Swift, no Objective-C code.
> - No dependencies on closed source apple libraries
> - Keep the same interface, so that the library is compatible with the code 
> the current cocoa compiler generates
> - Better server support that the current Objective-C library.
> - Follow the new Swift packaging format to be compatible with the Swift 
> Package manager



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

Reply via email to