-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix almost all Sendable warnings #2994
Conversation
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.
And that without any unsafe/unchecked swift! Nicely done!
The intention here has been to wait until we could use the isolated views on ELP and ELF to do this work, to minimise the amount of runtime isolation checking. As the principal advocate for avoiding |
That comment applies to the changes in the production code, naturally: the changes in the tests are going to be just fine either way. |
@Lukasa I really would want to see these warnings go away because there are just too many of them, I lose track of others (point in case this one: #2995 (comment)). I hear you w.r.t. to the And once we have the isolated views (which are fab btw), we can still replace all the code, it's super easy to spot by grepping for tl;dr: This improves things and I mandate that it doesn't regress anything. So I don't think there's any point in waiting. |
Motivation:
Opening the
swift-nio
repository made me warning blind because there were always so many trivially fixable warnings about things that were correct but cannot be understood by the compiler.Modifications:
Fix all the sendable warnings that popped up, except for one test where
NIOLockedValueBox<Thread?>
isn't sendable becauseFoundation.Thread
seemingly isn'tSendable
which is odd. Guessing that'll be fixed on their end.Result: