Sqlite.swift: Plans for Swift 3?

Created on 20 Jun 2016  路  18Comments  路  Source: stephencelis/SQLite.swift

I'm not trying to rush anything, just wanted ask if you are planning to support Swift 3 at some point in the future since it doesn't seem to have been mentioned yet.

Most helpful comment

I have a (broken, unpushed) branch going. It's a big migration :)

All 18 comments

I have a (broken, unpushed) branch going. It's a big migration :)

Cannot wait to try it out @stephencelis

Hey @stephencelis. Any plans on when you will be pushing the branch?

Hey, guys:

so I we start to use this PR in my project(migrated to swift3.0 already). Or I still need to wait?

thanks! this is a amazing library :)

@bytegh you still need to wait. It is still broken in Xcode 8 GM.

@stephencelis
hi, is there an eta on the Swift 3 migration process ?

There's now a branch with a working test suite (swift3-mariotaku). Would be helpful to see if it works in actual projects though, please give it a try if you can.

I have a compilation error using Swift3-mariotaku branch

Pods/SwiftyMarkdown/SwiftyMarkdown/SwiftyMarkdown.swift:295:75: Cannot convert value of type 'ClosedRange' (aka 'ClosedRange') to expected argument type 'Range' (aka 'Range')

@iLandes that's an unrelated project (which might not have been converted to swift3 yet)

I'm getting an 'ambiguous for type lookup error' using swift3-mariotaku branch. I'm subclassing Operation (which was NSOperation in swift 2) in my code. Looks like the conflict is 'enum Operation' in Connection.swift.

@edswafford A workaround would be to specify Foundation.Operation. We should probably nest that in Connection to avoid the conflict.

Works great for me, thanks a lot!

I would make the run() functions on Connection @discardableResult, though - I use them for updates where I don't need the result, and this leads to pollution with warnings about unused results.

Hello,
this used to worked, but with swift3-mariotaku gives
"Ambiguous reference to member "column(_:primaryKey:check:defaultValue:)"

...
try self.db!.run(self.magnets!.create(ifNotExists: true) { t in
t.column(columns.id, primaryKey: .Autoincrement) <--- Here
t.column(columns.TITLE)
t.column(columns.MSG)
t.column(columns.PARENT_ID)
t.column(columns.TYPEMAGNET)
})
...

But this works (but how then to do the autoincrement?):

            t.column(columns.id, primaryKey: true)

THE ANSWER for me was in Schema.swift:493

    primaryKey.map { Expression<Void>(literal: $0 == .autoincrement ? "PRIMARY KEY AUTOINCREMENT" : "PRIMARY KEY") },

So i used in lowercased:
t.column(columns.id, primaryKey: .autoincrement)

compiled.
thx

Having issues with the
screen shot 2016-09-20 at 2 46 02 pm
Swift3-mariotaku branch...

The swift3-mariotaku branch is working for me in Xcode 8.

I'm using this line in my Carthage cartfile:

github "stephencelis/SQLite.swift" "swift3-mariotaku"

And I updated Carthage with this:

carthage update --platform iOS --no-use-binaries

Hey, any progress with Swift 3? Is that an update we will be seeing in the foreseeable future?

@SerenadeX still WIP but should get merged soon

closed with #502

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fortitude1990 picture fortitude1990  路  4Comments

justdan0227 picture justdan0227  路  7Comments

DiamondYuan picture DiamondYuan  路  3Comments

WDDong picture WDDong  路  7Comments

bitflying picture bitflying  路  5Comments