-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Main framework compiles on Linux #354
Conversation
So the SPM issue is not with CSQLite but is the dreaded |
@fpillet, this is huge news, and I hope @zmeyc is happy, too :-) For full information, we had a Twitter conversation in which we agreed on ignoring NS-prefixed foundation types on the Linux platform, since those are unlikely to exist at runtime in a Linux project. Also, this PR is a preliminary step towards Linux support, that will be announced and given proper support in a post-GRDB 3.0 release. I have two requests before the PR is merged:
With those two updates, |
Ok I'm on it. Since this is the only actual code change I made, I'm not surprised it happens at this very spot, even though running tests locally here worked fine and the compiler didn't crash. Thanks for the additional info about using Sourcery to auto-generate LinuxMain, it's a nice idea! I'll remove my LinuxMain.swift from the PR. |
Thanks Florent! We'll look at Sourcery or any other technique later. Oh, an important reminder since we don't have Linux tests yet: the last Linux PR had some oddities with date coding and/or decoding. If your project uses dates, be watchful! |
Interestingly, the code I changed for UUID works fine in a Playground where I tested it before committing. The compiler chokes when emitting SIL for this perfectly valid code :( I'll revert to your previous implementation for this method then. |
…more modern implementation
Hi! Maybe it will be easier to use this PR as a base: https://github.com/groue/GRDB.swift/pull/205/commits |
@zmeyc: I'm not sure #205 is the best base: it was written for GRDB 0.106.1 and Swift 2.2, when we're on the way to GRDB 3 and Swift 4.1. Too much things have changed since, and I expect merging/rebasing to be a painful job. Besides, Foundation on Linux has evolved significantly (let's hope for the best). However, your amazing Docker/Sourcery job has an intact value. It is likely to be cherry-picked soon :-) |
@groue @fpillet I agree that it's probably easier to manually patch it in, but we were using mid 2017 Swift 3.1 snapshots, so it's not that old. :) Imo it's worth keeping NS-types too, we fixed incompatibilities in them which were minor. I think it's worth browsing the entire patch and checking which of these workarounds are still needed, especially Date-related ones. I can repatch that PR into latest GRDB if you would like me to. |
@zmeyc, I promise I will make sure your hard work won't be lost. Yes your entire patch will be carefully studied. You're the first father of GRDB on Linux, and this won't be forgotten. Yes I'll be happy when you jump in again in the project, so that we can finally announce full Linux support. @fpillet's patch does not come from nowhere: I guided him to #205 when he expressed his intent, and he was happy to read our conversations. Right now, this PR only makes sure @fpillet can run the most recent GRDB on Linux (the future GRDB 3, actually). This is not a full Linux release yet. It will come later. Don't rush: we still have time. |
@fpillet, thanks for the changes. Is the PR ready for you? |
Thanks Florent! |
Main framework compiles and runs on Linux.
Still fighting with SPM to get tests compiling (due to issue with building CSQLite in some conditions)