-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixed POSIXError.Code
for Linux
#2113
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
What's the policy on API breakage in Corelibs at this point @parkera @millenomi? I mean, I doubt there's very much code that is e.g. |
@swift-ci please test |
All that code should still work, the new |
This will break:
We will now detect this as a non-exhaustive switch (all the enum patterns are now expression patterns). |
That is correct, but that code was invalid in the first place. This project is only used on non-Darwin platforms, and to my knowledge a non-exhaustive switch statement would be invalid anyway because this has been broken in Linux since 2016, not to mention different Linux kernel versions and other OS like BSD and Android would have different error codes entirely. |
Hm, looks like this patch isn't quite rebased enough to build yet. |
The error is that
I don't see how that's possible since it is defined as part of the Glibc module swiftlang/swift@8157194#diff-c86969eead9d9f63ad0faa3e75802e66R268. As far as I can tell, |
Should not use `POSIXError.Code` on Linux since it is currently broken. swiftlang/swift-corelibs-foundation#2113
Use `POSIXErrorCode` to validate `errno` value. swiftlang/swift-corelibs-foundation#2113
|
Depends on swiftlang/swift#24028 for |
Since it is not compiled with Glibc yet https://bugs.swift.org/browse/SR-10485 swiftlang/swift#24028 swiftlang/swift-corelibs-foundation#2113
@CodaFi Please test again. Fixed any usage of |
@swift-ci test |
@spevans For some reason seems the CI was never triggered. |
@swift-ci test |
@swift-ci test |
@spevans For some reason seems the CI was never triggered, again. |
@swift-ci test |
@spevans The CI seems to be broken or just not responding. |
We don’t have more visibility than you to the CI machines (except the Android/Windows ones). You can look in https://ci.swift.org/job/swift-corelibs-foundation-PR-Linux/ to see if 2113 is in the left list. The last one I see is https://ci.swift.org/job/swift-corelibs-foundation-PR-Linux/2503/. Since swiftlang/swift#24028 haven’t been merge, I think the “please test” invocations have to say so, so the CI is started with the right set of PRs. |
@swift-ci please test |
@compnerd To provide proper Windows support, we would need |
@compnerd Added |
@swift-ci test |
I didn't break this
|
@swift-ci please test Linux platform |
@compnerd CI passed, ready to merge. |
I still want confirmation from somebody at Apple that this is ready to go. Ping @parkera @millenomi |
This seems reasonable to me, but @millenomi may have opinions on this. |
For reference, |
Thank you for the ping — lots of traffic have pushed this a lot lower than I hoped. |
It's good. |
This broke the windows build! |
I would be happy to assist you in fixing it, but it shouldn't break, please take a look at swiftlang/swift#24056 as long as that is compiling correctly, Are you compiling the compiler again before Foundation, or in separate steps? This will only work for a compiler built after swiftlang/swift#24056 |
@colemancda - that change is merged and is available, but, Im still seeing a ton of undefined values (e.g. |
In fact, it has hit the CI too: https://dev.azure.com/compnerd/windows-swift/_build/results?buildId=1431 |
Ok, I am going to introduce a patch to fix that, I know where the issue is. |
Windows build fixed in #2130 |
We are seeing a failure on swift-5.1-branch due to this change: https://ci.swift.org/view/swift-5.1-branch/job/oss-swift-5.1-incremental-RA-linux-ubuntu-18_04/475/
|
This is blocking PR testing on swift-5.1-branch of apple/swift |
Incremental builds are not going to work, this PR requires the Swift compiler to be built with swiftlang/swift#24028 included. It seems the failure is due to building with a version of Swift that does not include that fix. |
@shahmishal Please see swiftlang/swift#24028 |
@colemancda has swiftlang/swift#24028 already been cherry-picked into swift-5.1-branch? |
@shahmishal So either the compiler's |
if not, please create a PR for swift-5.1-branch. |
Ok |
Right now
POSIXError
is broken on Linux, with Foundation definingPOSIXError.Code
that is valid for Darwin, not Linux.