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
Use #fileID/#filePath instead of #file #2306
Conversation
Motivation: Modifications: Changed #file to #filePath or #fileID depending on the situation
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.
A couple of small things need fixing but the rest looks good.
@@ -0,0 +1,218 @@ | |||
//===----------------------------------------------------------------------===// |
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.
This file shouldn't exist anymore, it was removed in #2292
Sources/NIOCore/EventLoop.swift
Outdated
@@ -786,7 +786,7 @@ extension EventLoop { | |||
line: UInt, | |||
_ task: @escaping FlatScheduleTaskDelayCallback<T> | |||
) -> Scheduled<T> { | |||
let promise: EventLoopPromise<T> = self.makePromise(file:#file, line: line) | |||
let promise: EventLoopPromise<T> = self.makePromise(file:#fileID, line: line) |
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.
Looks like there was a bug here, it should just be the file
passed into the func
let promise: EventLoopPromise<T> = self.makePromise(file:#fileID, line: line) | |
let promise: EventLoopPromise<T> = self.makePromise(file: file, line: line) |
<<<<<<< Updated upstream | ||
fileprivate func XCTAsyncAssertTrue(_ predicate: @autoclosure () async throws -> Bool, file: StaticString = #file, line: UInt = #line) async rethrows { | ||
======= | ||
#if compiler(>=5.5.2) && canImport(_Concurrency) | ||
fileprivate func XCTAsyncAssertTrue(_ predicate: @autoclosure () async throws -> Bool, file: StaticString = #filePath, line: UInt = #line) async rethrows { | ||
>>>>>>> Stashed changes |
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.
Oops, bad merge, I think you want:
<<<<<<< Updated upstream | |
fileprivate func XCTAsyncAssertTrue(_ predicate: @autoclosure () async throws -> Bool, file: StaticString = #file, line: UInt = #line) async rethrows { | |
======= | |
#if compiler(>=5.5.2) && canImport(_Concurrency) | |
fileprivate func XCTAsyncAssertTrue(_ predicate: @autoclosure () async throws -> Bool, file: StaticString = #filePath, line: UInt = #line) async rethrows { | |
>>>>>>> Stashed changes | |
fileprivate func XCTAsyncAssertTrue(_ predicate: @autoclosure () async throws -> Bool, file: StaticString = #filePath, line: UInt = #line) async rethrows { |
<<<<<<< Updated upstream | ||
("testHTTPResponseStatusFromStatusCode", testHTTPResponseStatusFromStatusCode), | ||
("testHTTPResponseStatusCodeAndReason", testHTTPResponseStatusCodeAndReason), | ||
======= | ||
("testHTTPResponseStatusFromStatusCode", testHTTPResponseStatusFromStatusCode), | ||
>>>>>>> Stashed changes |
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.
Bad merge again. The best way to fix this one is to run ./scripts/generate_linux_tests.rb
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.
How would I know when I need to run this in the future?
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.
Every time you add tests. Also one of the CI jobs ("pull request validation (soundness)") will fail if it needs to be run and hasn't been.
Nightly CI failure is unrelated. Merging over it. |
Motivation:
#fileID introduced in Swift 5.3, so no longer need to use #file anywhere
Modifications:
Changed #file to #filePath or #fileID depending on the situation