-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: make the Theme
type support sendablity
#351
Conversation
A simple sample code for test in Swift 6:
|
Hi, I think there is more to it than making I already went through this process for gonzalezreal/NetworkImage. See gonzalezreal/NetworkImage#34. I didn't have time to do the same with MarkdownUI. You are welcome to give it a try. There is an attempt in #349. |
I reviewed that PR already, but it seems too-much-changed to review and merge all at once. I needed this functionality in my project, and it worked with just this one simple change. There’s no need to mark everything as In my opinion, we should migrate step by step. |
Sure! I agree. I was misled by the PR title. My understanding is that this PR is about making |
Absolutely! With this change, you'll be able to use the |
Theme
type support Swift 6Theme
type support sendablity
Thanks for merging, please don't forget to tag and release this (maybe 2.4.2) so that I can continue using this fantastic library directly. Thanks again 🙌🏻 |
`Theme` was marked as `Sendable` in gonzalezreal#351. There's nothing wrong with this per se, but sendability is not inferred for public types, a structure is only truely `Sendable` if all of its members are `Sendable`, and most of the members of `Theme` are not `Sendable`. This patch address the sendability warnings for Theme's members that the compiler emits (regardless of `StrictConcurrency`).
`Theme` was marked as `Sendable` in gonzalezreal#351. There's nothing wrong with this per se, but sendability is not inferred for public types, a structure is only truely `Sendable` if all of its members are `Sendable`, and most of the members of `Theme` are not `Sendable`. This patch address the sendability warnings for Theme's members that the compiler emits (regardless of `StrictConcurrency`).
The type must be sendable or it will be an error in Swift 6