I don't know how people are able to make sense of some modern Swift warnings
tfw you accidentally send a non sendable system type returned by a call from a main actor isolated context to a non isolated instance method which cannot cross actor boundaries and you're like "duhhh”
@christianselig so for that I’ve made an extension that make them sendable. Because why not.
@dimillian That's another part that confuses me, many of these are really basic system types (just integer enums) and it's unclear to me why they aren't Sendable already
@christianselig I don’t know why. I think it’s because they’ll be when Swift 6 will come and we’re probably not supposed to see this warning yet somehow.
@dimillian @christianselig are they public? Public types have to be explicitly declared as Sendable as this is part of the interface of the module.
@layoutSubviews @dimillian I'm not sure how explicit access levels of Objective-C system stuff works with Swift, but it's just `UNNotificationSetting` in this case, which is totally exposed to Swift
@christianselig @dimillian ah right. Either the developers have not taken the time to mark it as Sendable yet, or it’s not actually Sendable. No way to know as of now 😔
@christianselig @layoutSubviews @dimillian y’all probably already know this, but `@preconcurrency import UserNotifications` is your friend
@overenginerd @christianselig @layoutSubviews so if I have my own package which use concurrency inside. Importing it like that is like cheating?
@dimillian @overenginerd @christianselig yep. You could cheat for now, but you’d be forfeiting a lot of the benefits of Swift Structured Concurrency coming down the line 😕
@layoutSubviews @dimillian @christianselig yeah no I would only use this for modules I don’t control, like UIKit or UserNotifications

@christianselig @layoutSubviews @dimillian LOL NSImage over here. And DispatchTimeInterval.

It's the wild, wild west of Sendable types out here in "I don't work at Apple" land 🤠

@dimillian @christianselig To some degree that’s true. You can add @preconcurrency to your imports on modules that don’t use Sendable yet to get rid of some warnings. Once those modules do support it who knows which of their types will be Sendable and which won’t though.
@dimillian @christianselig Adoption of concurrency across UIKit and AppKit maybe it’s biggest weakness right now. Like you take NSApplicationDelegate, 95% of which must be called on the main thread, but 5% is not, and entire protocol is not marked as @MainActor. Unclear if Swift 6 / new SDK will clean this up.
@christianselig it's like letting pixel pals cross over the dynamic island 🚫
@christianselig pls stop harassing the Main Actors and respect their boundaries they don’t like random stuff being sent to them 😤
@christianselig I understood none of those words and I thought I knew Swift