-
Notifications
You must be signed in to change notification settings - Fork 193
always @preconcurrency import Glibc/Musl/Android/Bionic/WASILibc #1175
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
Conversation
f004642
to
7c73fc2
Compare
7c73fc2
to
662a5f1
Compare
@swift-ci test |
Interesting. I wonder whether this is really the right fix, or whether we should be using API notes to annotate |
That seems like a pretty big project and will always miss something, no? But of course, I'd be fine with that too. But crucially until that's done, I think this is what we should do. We can remove the |
@swift-ci test macos |
friendly ping @parkera |
@weissi if this one is also for 6.1, please cherry pick |
### Motivation: The non-`Darwin` libcs don't have the correct concurrency annotations. But due to these Swift bugs, it's important that the _first_ importer uses `@preconcurrency`: - swiftlang/swift#79414 - swiftlang/swift#77866 ### Modifications: Much like the Foundation (& corelibs) PRs such as swiftlang/swift-foundation#1175 , use `@preconcurrency import` for the non-`Darwin` libcs. ### Result: Fewer bad warnings/errors in user code.
Related issues:
I've got a working program
but alas, if
swift-format
reformats it, it makes it (note that the two imports are reordered)which unfortunately doesn't compile
the problem is that
Foundation
importsGlibc
/Musl
but doesn't mark them@preconcurrency
.This has been used to rewrite the sources: