Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@JacopoMangiavacchi Server side already works using something like Perfect
or Zewo, I already have separate server adapters for them
https://github.com/apocolipse/TPerfectHTTPServer
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@nsuke hah good catch, bad habits from other languages ;) Fixed
---
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@nsuke requested cleanup completed
---
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
Also, to anyone using this, I'm making a pretty decent sized change right
now to how `TEnums` work with Swift Enums. Backstory is that Swift enums are
overly opinionated and don't work well
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
Its just a proposal so far, i don't think it'll be implemented for Swift 3
(but i havent been keeping close track, correct me if i'm wrong) It'll make
more sense to do once Swift4 drops and SPM
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@gotev feel free to contribute anything that was mentioned there. Its
otherwise code complete (and likely better supported than the already merged
Swift2 and Cocoa/Obj-C generators), I
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@jeking3 no, any docs on whats needed for that? I can add it in. The old
Cocoa+Swift generator was lacking here as well. (As is the Obj-C Cocoa
generator)
---
If your project is set up
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
Update 2/28/2017:
Old Swift generator and new merged into one,
Old generator under `cocoa` option, `promise_kit` option only available for
old generator as well.
I don't have any
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@nsuke I've removed the attribution, will keep it in my personal Lib repo
thats used strictly for SPM integration. Fixed the error codes you mentioned
above.
I'll go ahead and merge
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r87716435
--- Diff: lib/swift/README.md ---
@@ -0,0 +1,217 @@
+Thrift Swift Library
+=
+
+License
+---
+Licensed
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r87716418
--- Diff: lib/swift/Sources/LinuxHelper.swift ---
@@ -0,0 +1,34 @@
+//
+// LinuxHelper.swift
+// Thrift
+//
+// Created
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r87716408
--- Diff: compiler/cpp/src/thrift/generate/t_swift_3_generator.cc ---
@@ -0,0 +1,2553 @@
+/*
--- End diff --
While I don't disagree, I
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
Update:
I've modified the generated Async clients to use a new `TAsyncResult`
parameter for callbacks rather than Optional Return/Error tuples. Short
version of why is that those
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
I've created 2 separate HTTP Servers using external libraries and made them
available to play with
https://github.com/apocolipse/TZewoHTTPServer and
https://github.com/apocolipse
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@fumoboy007 so for clients you should be doing something like this:
```swift
let factory = THTTPSessionTransport.Factory(url: serviceURL)
let client = HermesAsyncClient
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@fumoboy007 There is `TAsyncClient` in TClient.swift as well as
`TAsyncTransport/Factory` in TTransport.swift, and the generator will generate
async clients properly (`--gen swift_3
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@fumoboy007 @ChristopherRogers Have you all found any other outstanding
issues that need addressing?
@nsuke @kdubb What final steps do we need to do to get this into the
official
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r82631304
--- Diff: compiler/cpp/src/thrift/generate/t_swift_3_generator.cc ---
@@ -0,0 +1,2458 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r80368318
--- Diff: compiler/cpp/src/generate/t_swift_3_generator.cc ---
@@ -0,0 +1,2458 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r80368238
--- Diff: lib/swift/Sources/TMultiplexedProtocol.swift ---
@@ -0,0 +1,47 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r80365498
--- Diff: compiler/cpp/src/generate/t_swift_3_generator.cc ---
@@ -0,0 +1,2458 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r78584053
--- Diff: lib/swift/Sources/TApplicationError.swift ---
@@ -0,0 +1,157 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@ChristopherRogers @fumoboy007 I implemented union support with enums,
here's an example of generated code:
```
union TestUnion {
1: i32 data,
2: string message,
3: bool
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
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
That'll require generation of both read and write serialization code (which
I try to abstract much of to the library), but its doable I suppose.
---
If your project is set up for it, you can
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@ChristopherRogers Something like this?
```
union AUnion {
1: string result,
2: CustomException error
}
```
```swift
enum AUnion {
case result(val: String
Github user apocolipse commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1084#discussion_r78313057
--- Diff: lib/swift/Sources/LinuxHelper.swift ---
@@ -0,0 +1,42 @@
+//
+// LinuxHelper.swift
+// Thrift
+//
+// Created
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1084
@fumoboy007 thanks, thought i had the overflow ones in there, will add them
back in :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub
GitHub user apocolipse opened a pull request:
https://github.com/apache/thrift/pull/1084
THRIFT-3773 Swift 3 Native Library
Here is my implementation of the Thrift library for Swift 3.0, pure swift.
There is no Objective-C requirement here.
For implementation and design
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1002
Yeah I think that would be the most appropriate way, making sure that
people that use it /want/ to use it and/or know that its not a Swift convention.
SPM integration should come with Swift
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1002
So for Cocoapods/Carthage, you're also using Frameworks (startup time is
negligible). I'd almost recommend manually handling separate Podspec's to keep
things Module scope namespaced
Github user apocolipse commented on the issue:
https://github.com/apache/thrift/pull/1002
In my opinion this is very Un-Swifty. Namespace prefixes are an
Objective-C Cocoa convention, Swift tries to get away from this convention (in
fact with Swift 3.0, NS prefixes on many
32 matches
Mail list logo