Grokbase Groups Thrift dev June 2016
[ ]

ASF GitHub Bot commented on THRIFT-3812:

Github user mfrawley commented on the issue:

     @apocolipse Like the ideas. Protocols can't be nested under a struct. You get:
     error: declaration is only valid at file scope protocol MyService {}
     I like the Swift packages suggestion (which unfortunately are not in a stable Swift release yet). Frameworks influence app startup time and Cocoapods/Carthage already provide this functionality with podspecs (we use Cocoapods atm).
       A bigger issue we've run into when updating (since we generate code for 6+ client langs) is that we have property naming collisions .e.g. .code in subtypes of NSError had to be renamed to errorCode, or .description. Being able to have some way of dealing with that would be nice. One possible solution might be a language-specific alias e.g. generate 'errorCode' for Swift, but leave it as 'code' for other langs. That would avoid having to uglify all client code with manually prefixed names. It's a different issue I know but it's also name-collision related, and has cost me some considerable effort.

Option to prefix namespace to Swift type names

Key: THRIFT-3812
Project: Thrift
Issue Type: New Feature
Components: Swift - Compiler
Reporter: Håkon Hitland
Priority: Minor

Swift does have a way to namespace things within a pod, which can lead to name collisions.
This adds an option "swift:prefix_namespace" that will add Cocoa-style prefixes to the generated code if the file has a defined Swift namespace.

This message was sent by Atlassian JIRA

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupdev @
postedJun 13, '16 at 1:13p
activeJun 18, '16 at 10:26a

1 user in discussion

ASF GitHub Bot (JIRA): 3 posts



site design / logo © 2022 Grokbase