-
Notifications
You must be signed in to change notification settings - Fork 263
Add @discardableResult annotation to applicable public API methods. #166
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
This maintains consistency with the Darwin XCTest APIs.
@swift-ci Please test |
Although the PR CI did pass, I've noticed a couple of disturbing issues from the OS X CI log. Firstly, it seems that the binaries for the functional tests are failing to launch properly, with the following error:
Secondly, the CI is indicating a pass even though there are failing tests. |
A passing Linux CI build is probably sufficient for us to merge this pull request. The macOS failures definitely concern me, though. It looks like the macOS build failed for #165 as well, but Swift CI reported it as a success. @shahmishal, any idea what might be going on here? |
I forgot to mention that I filed a couple of bugs for tracking this: |
This might be related to exit code of
I am re-building to see if exit code was set correctly. |
exit code after test failure with grep command is set to "0".
We will need to look into https://github.com/apple/swift-corelibs-xctest/blob/a21a8546fe2e3e2d5b2ed062300982396898f3d1/build_script.py#L113 |
It looks like the Unfortunately, since I think all builds, regardless of whether they pass, include |
Just to make sure everything is in order, let's wait and re-run CI here once #167 has gone in, then we can confidently merge this and feel confident that CI is once again providing the feedback we expect from it. |
@swift-ci Please test |
@swift-ci Please test Linux |
@parkera Do you recognize this Foundation test failure from other bots? It seems to be consistently crashing in https://ci.swift.org/job/swift-corelibs-xctest-PR-Linux/114/ |
@briancroom The failures in The job config needs to become:
ie. @shahmishal Can you update the XCTest PR builds? |
If the tests fail without the |
Good suggestion - I'll take the same approach for Dispatch. |
Ok - created the following to update the build scripts to infer |
With #169 and swiftlang/swift#4458 merged, let's see if this will pass now! |
@swift-ci Please test Linux |
The failure in Foundation is unrelated to this change:
The test is missing a comma. Apparently it calls out to an external resource and that external website has changed its response to now include a comma. /cc @pushkarnk, who added the test. In any case, I think this pull request is good to merge, @briancroom. I'll follow up about the Foundation test. |
Oops! You beat me to it, haha. Sorry for the noise! 😛 |
It looks like Foundation has an outstanding PR for this failure already: swiftlang/swift-corelibs-foundation#590 I think it's worth keeping this open a little bit longer so we can keep pinging @swift-ci on it until we're all green here, since there has been so much CI churn recently :) |
@swift-ci Please test Linux |
@seabaylea XCTest PR updated to use |
Excellent! This looks great. Thanks to everyone who pitched in. |
This maintains consistency with the Darwin XCTest APIs. This also cleans up some warnings in the functional test suite which were being generated because this annotation wasn't present.
I'll note that there's a case to be made that
expectation(description:file:line:)
should not have@discardableResult
, because the expectation it produces can only be fulfilled by invoking a method on the returned value. Nonetheless, I think it's better to keep the APIs in sync for right now and revisit in the future.