Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thrift 2905 & - Modern Objective-C & Swift Support #539

Closed
wants to merge 71 commits into from

Commits on Jul 3, 2015

  1. Modernized Cocoa

    • Use NSError based error & exception handling
    • Use NS_ENUM enumerations (with standard format)
    • nullable & nonnull attributes for parameters
    • Swift interoperability (nullability, enums & error handling)
    • Removed instance variables from public header
    • Remove retain/release stubs
    • Remove all deallocs
    kdubb committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    a7e2544 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e73f7b6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1220b0a View commit details
    Browse the repository at this point in the history
  4. Protocols wrap transport errors with more information

    The current message name & source file/line information is added to the protocol error that wraps the transport error.
    kdubb committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    0b91a77 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9925c46 View commit details
    Browse the repository at this point in the history
  6. Rename transport "Clients" to transports. Client is the terminology f…

    …or the top level object already.
    kdubb committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    467efe8 View commit details
    Browse the repository at this point in the history
  7. Fix async client init method

    kdubb committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    fcc3ae3 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2015

  1. Fix setter name generation

    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    cb0f432 View commit details
    Browse the repository at this point in the history
  2. Simplify NSError reading logic

    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    5ffe347 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a2bf04 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    52d0967 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ab8dac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6f93825 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c7c891 View commit details
    Browse the repository at this point in the history
  8. Use debugDescription instead of description for structs/exceptions

    Allows implementing "description" by the application via category/extension
    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    4b9aef7 View commit details
    Browse the repository at this point in the history
  9. Add podspec

    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    c723c6d View commit details
    Browse the repository at this point in the history
  10. Move TSSLStreamTransport "close" method back

    Was moved to TNSStreamTransport to make a general close method & keep streams private.  Instead we want the streams public and so the close method is moved back to its origin.
    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    6bfe824 View commit details
    Browse the repository at this point in the history
  11. Update SSL validation to use current method

    The new method uses SecTrustEvaluate on the stream's internal trust object.  Removes the deprecation warning given by previous implementation.
    kdubb committed Jul 4, 2015
    Configuration menu
    Copy the full SHA
    1a55775 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5b83a47 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2015

  1. Remove redundant properties from TSSLSocket & TSocket, make common cl…

    …ose method in TNSStream
    kdubb committed Jul 5, 2015
    Configuration menu
    Copy the full SHA
    5eff152 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e485c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33b5605 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c154eef View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d1e8abd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ada47bc View commit details
    Browse the repository at this point in the history
  7. Remove all request customization from THTTPSessionTransport

    All customization should be done via the NSURLSession & NSURLSession config.  This should be the preferred method so we enforce that by disallowing any customization of the request before usage.
    kdubb committed Jul 5, 2015
    Configuration menu
    Copy the full SHA
    5c570ed View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ee1a5c5 View commit details
    Browse the repository at this point in the history
  9. Allow methods with same name in different service definitions

    All helper classes (e.g. _args & _result) are generated with the service name included. This fixes the issue with duplicate helper class names.
    kdubb committed Jul 5, 2015
    Configuration menu
    Copy the full SHA
    0164013 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5355538 View commit details
    Browse the repository at this point in the history
  11. Set deployment target to reasonable number

    It could be as low as 6.0 but with 90% of the world on iOS 8. I don't think we need to worry about that.
    kdubb committed Jul 5, 2015
    Configuration menu
    Copy the full SHA
    c2c3336 View commit details
    Browse the repository at this point in the history
  12. Remove C++11 statements

    kdubb committed Jul 5, 2015
    Configuration menu
    Copy the full SHA
    c4ea25d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1d72c2b View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2015

  1. Update comment

    kdubb committed Jul 6, 2015
    Configuration menu
    Copy the full SHA
    158e4e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f87ac15 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba70058 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    de16b4d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72561ea View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0091c4d View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2015

  1. Configuration menu
    Copy the full SHA
    e8e55d2 View commit details
    Browse the repository at this point in the history
  2. Ehance errors

    Use positive error codes
    HTTP error codes are more specific
    kdubb committed Jul 7, 2015
    Configuration menu
    Copy the full SHA
    113ee76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    06c58d0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f20484b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    84d8203 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2015

  1. Configuration menu
    Copy the full SHA
    14b07ff View commit details
    Browse the repository at this point in the history
  2. Simplify property declarations

    kdubb committed Jul 16, 2015
    Configuration menu
    Copy the full SHA
    1db39d7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    766ed27 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2015

  1. Configuration menu
    Copy the full SHA
    f7fcec2 View commit details
    Browse the repository at this point in the history
  2. Fix 32 bit warnings

    kdubb committed Sep 15, 2015
    Configuration menu
    Copy the full SHA
    bae434e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4980859 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2015

  1. Configuration menu
    Copy the full SHA
    ed397a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df80254 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    663bf38 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2015

  1. Swift Support

    • Generates all client and server code, uses Cocoa-ObjC based protocols and transports
    • Compiles error free but completely untested
    • Supports same options as original cocoa (aka ObjC) gerator including asynchronous protocols (both block and promise)
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    808ae20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b9ca06 View commit details
    Browse the repository at this point in the history
  3. Ensure all types are Hashable

    • Fixes problems with nested containers
    • Uses wrapper containers for List, Set & Map; Swift currently disallows adding protocol conformance to generic types via extension (once it does the wrapper types can be discarded)
    • Greatly simplifies read/write value code
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    b1c2bb7 View commit details
    Browse the repository at this point in the history
  4. Fix TEnum default init implmentation

    Now generated in actual enum value
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    f167802 View commit details
    Browse the repository at this point in the history
  5. Fix constant generation

    Generates proper Swift constants for all types
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    e384ee2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d0b4f47 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    af2602a View commit details
    Browse the repository at this point in the history
  8. Remove validate_required option from Swift generator

    Validation is effectively always required to ensure Swift optional unwrapping doesn't throw errors
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    37fc143 View commit details
    Browse the repository at this point in the history
  9. Fix enum default initializers

    Swift was randomly handling default initializers for the enums incorrectly.  Some worked, some failed, no rhyme or reason. Putting the initalizer in the main enum declaration solves the issue
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    94e6b9d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bc430f1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    eb674f7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e641d4c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ab8b035 View commit details
    Browse the repository at this point in the history
  14. Prefix wrapper types with T (e.g. TSet, TList, etc)

    Provides uniform naming and stops confusion of Swift Set and Thrift Set
    kdubb committed Oct 8, 2015
    Configuration menu
    Copy the full SHA
    c6bef3a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    276d447 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    036d362 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    2e1ad3e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    bf1d365 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2015

  1. Bring application/protocol/transport exceptions in line

    The application, protocol & transport exceptions are now reported in much the same conditions (and with same error code) as with other language bindings.  Java & CPP were used as examples of when to throw the correct exceptions.
    kdubb committed Oct 9, 2015
    Configuration menu
    Copy the full SHA
    4f6f812 View commit details
    Browse the repository at this point in the history