-
Notifications
You must be signed in to change notification settings - Fork 53
Enable Swift 6 feature flags #258
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
Changes from all commits
ace02df
ecc04ad
65de0b4
e052ba3
0700856
7d79ae0
686178a
513d1c4
0e4faa0
35dc3f5
0116816
1b3ab4d
a3c598b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,6 +563,18 @@ | |
| MTL_ENABLE_DEBUG_INFO = NO; | ||
| SDKROOT = iphoneos; | ||
| SUPPORTED_PLATFORMS = iphoneos; | ||
| SWIFT_UPCOMING_FEATURE_CONCISE_MAGIC_FILE = YES; | ||
| SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES; | ||
| SWIFT_UPCOMING_FEATURE_DISABLE_OUTWARD_ACTOR_ISOLATION = YES; | ||
| SWIFT_UPCOMING_FEATURE_EXISTENTIAL_ANY = YES; | ||
| SWIFT_UPCOMING_FEATURE_FORWARD_TRAILING_CLOSURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_GLOBAL_CONCURRENCY = YES; | ||
| SWIFT_UPCOMING_FEATURE_IMPLICIT_OPEN_EXISTENTIALS = YES; | ||
| SWIFT_UPCOMING_FEATURE_IMPORT_OBJC_FORWARD_DECLS = YES; | ||
| SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_ISOLATED_DEFAULT_VALUES = YES; | ||
| SWIFT_UPCOMING_FEATURE_REGION_BASED_ISOLATION = YES; | ||
| SWIFT_VERSION = 5.0; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, how was this empty before? What exactly does it do?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this is just enforcing the default as of XCode 16. XCode 16 ships with the Swift 6 compiler, which can run in Swift 4, Swift 5, or Swift 6 compiler modes. So I'm enforcing the default to then upgrade to 6 later. |
||
| TARGETED_DEVICE_FAMILY = "1,2"; | ||
IanVS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| VALIDATE_PRODUCT = YES; | ||
| }; | ||
|
|
@@ -772,6 +784,18 @@ | |
| MTL_ENABLE_DEBUG_INFO = YES; | ||
| ONLY_ACTIVE_ARCH = YES; | ||
| SDKROOT = iphoneos; | ||
| SWIFT_UPCOMING_FEATURE_CONCISE_MAGIC_FILE = YES; | ||
| SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES; | ||
| SWIFT_UPCOMING_FEATURE_DISABLE_OUTWARD_ACTOR_ISOLATION = YES; | ||
| SWIFT_UPCOMING_FEATURE_EXISTENTIAL_ANY = YES; | ||
| SWIFT_UPCOMING_FEATURE_FORWARD_TRAILING_CLOSURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_GLOBAL_CONCURRENCY = YES; | ||
| SWIFT_UPCOMING_FEATURE_IMPLICIT_OPEN_EXISTENTIALS = YES; | ||
| SWIFT_UPCOMING_FEATURE_IMPORT_OBJC_FORWARD_DECLS = YES; | ||
| SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_ISOLATED_DEFAULT_VALUES = YES; | ||
| SWIFT_UPCOMING_FEATURE_REGION_BASED_ISOLATION = YES; | ||
| SWIFT_VERSION = 5.0; | ||
| TARGETED_DEVICE_FAMILY = "1,2"; | ||
| }; | ||
| name = Debug; | ||
|
|
@@ -825,6 +849,18 @@ | |
| SUPPORTED_PLATFORMS = iphoneos; | ||
| SWIFT_COMPILATION_MODE = wholemodule; | ||
| SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; | ||
| SWIFT_UPCOMING_FEATURE_CONCISE_MAGIC_FILE = YES; | ||
| SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES; | ||
| SWIFT_UPCOMING_FEATURE_DISABLE_OUTWARD_ACTOR_ISOLATION = YES; | ||
| SWIFT_UPCOMING_FEATURE_EXISTENTIAL_ANY = YES; | ||
| SWIFT_UPCOMING_FEATURE_FORWARD_TRAILING_CLOSURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_GLOBAL_CONCURRENCY = YES; | ||
IanVS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| SWIFT_UPCOMING_FEATURE_IMPLICIT_OPEN_EXISTENTIALS = YES; | ||
| SWIFT_UPCOMING_FEATURE_IMPORT_OBJC_FORWARD_DECLS = YES; | ||
| SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES; | ||
| SWIFT_UPCOMING_FEATURE_ISOLATED_DEFAULT_VALUES = YES; | ||
| SWIFT_UPCOMING_FEATURE_REGION_BASED_ISOLATION = YES; | ||
| SWIFT_VERSION = 5.0; | ||
IanVS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| TARGETED_DEVICE_FAMILY = "1,2"; | ||
| VALIDATE_PRODUCT = YES; | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,13 +13,13 @@ class SiteContainer { | |
|
|
||
| class Sites { | ||
| private var containers = [String: SiteContainer]() | ||
| private var messenger: FlutterBinaryMessenger? | ||
| private var messenger: (any FlutterBinaryMessenger)? | ||
|
|
||
| init(messenger: FlutterBinaryMessenger?) { | ||
| init(messenger: (any FlutterBinaryMessenger)?) { | ||
| self.messenger = messenger | ||
| } | ||
|
|
||
| func loadSites(completion: @escaping ([String: Site]?, Error?) -> Void) { | ||
| func loadSites(completion: @escaping ([String: Site]?, (any Error)?) -> Void) { | ||
| _ = SiteList { (sites, err) in | ||
| if err != nil { | ||
| return completion(nil, err) | ||
|
|
@@ -42,7 +42,7 @@ class Sites { | |
| } | ||
| } | ||
|
|
||
| func deleteSite(id: String, callback: @escaping (Error?) -> Void) { | ||
| func deleteSite(id: String, callback: @escaping ((any Error)?) -> Void) { | ||
| if let site = self.containers.removeValue(forKey: id) { | ||
| _ = KeyChain.delete(key: "\(site.site.id).dnCredentials") | ||
| _ = KeyChain.delete(key: "\(site.site.id).key") | ||
|
|
@@ -85,9 +85,9 @@ class SiteUpdater: NSObject, FlutterStreamHandler { | |
| private var notification: Any? | ||
| public var startFunc: (() -> Void)? | ||
| private var configFd: Int32? = nil | ||
| private var configObserver: DispatchSourceFileSystemObject? = nil | ||
| private var configObserver: (any DispatchSourceFileSystemObject)? = nil | ||
|
|
||
| init(messenger: FlutterBinaryMessenger, site: Site) { | ||
| init(messenger: any FlutterBinaryMessenger, site: Site) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, was this migration manual or automated?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Manually clicking "fix" in XCode, not sure how to make it more like |
||
| do { | ||
| let configPath = try SiteList.getSiteConfigFile(id: site.id, createDir: false) | ||
| self.configFd = open(configPath.path, O_EVTONLY) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we might get some warnings from libraries that we use, but it should be fine up until swift 6: