-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Drop read/write/close LibcShims and use the platform APIs directly from the SwiftPrivate module #40211
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
Drop read/write/close LibcShims and use the platform APIs directly from the SwiftPrivate module #40211
Conversation
…om the SwiftPrivate module
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.
I really like this change, but one minor question, is the renaming of read
, write
, close
required for something or can we just use the regular libc names?
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.
Do you know if the problem that prompted #20372 is resolved, or is this part of finding out?
@swift-ci please test |
This is part of figuring that out, yes :) |
@swift-ci please test |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
Build failed |
Build failed |
@swift-ci please test macOS platform |
@swift-ci please test Linux platform |
@swift-ci please test |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
Note that I have now reproduced the scenario that led to the revert last time (#20372, rdar://problem/45817565) and the build failure no longer occurs -- I believe this is due some recent work by Eric. So let's go forward with this change! |
Build failed |
I did the "rename" to avoid the name clash with methods called read/write/close on the structs defined in IO.swift. This felt like a less invasive solution compared to renaming of the methods, but I can easily do it the other way if you'd prefer that. @compnerd |
I assume that the "do it the other way" is mostly a typealias in the appropriate section or explicitly naming references to calls to the internal function. I think that is kinda nicer, but I'm not too concerned either way. To a certain extent it is about style, and I'm not convinced that this particular bit of style impacts much. |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
This was attempted before by @mikeash in #20194, later reverted in #20372. I'd like to try again -- the goal is to avoid depending on read/write/close APIs in libswiftCore.