From db86ac725bb4a194636c716461f5a166e93b29ba Mon Sep 17 00:00:00 2001 From: b1ackturtle Date: Wed, 26 Jun 2024 03:53:51 +0900 Subject: [PATCH] Fix compile warnings for Swift 6 language mode (#313) --- Tests/LoggingTests/LoggingTest.swift | 2 +- Tests/LoggingTests/TestLogger.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/LoggingTests/LoggingTest.swift b/Tests/LoggingTests/LoggingTest.swift index 48860972..f77b9dfe 100644 --- a/Tests/LoggingTests/LoggingTest.swift +++ b/Tests/LoggingTests/LoggingTest.swift @@ -399,7 +399,7 @@ class LoggingTest: XCTestCase { "lazy": .stringConvertible(LazyMetadataBox { "rendered-at-first-use" })]) } - private func dontEvaluateThisString(file: StaticString = #file, line: UInt = #line) -> Logger.Message { + private func dontEvaluateThisString(file: StaticString = #filePath, line: UInt = #line) -> Logger.Message { XCTFail("should not have been evaluated", file: file, line: line) return "should not have been evaluated" } diff --git a/Tests/LoggingTests/TestLogger.swift b/Tests/LoggingTests/TestLogger.swift index c324c41d..c8191268 100644 --- a/Tests/LoggingTests/TestLogger.swift +++ b/Tests/LoggingTests/TestLogger.swift @@ -219,7 +219,7 @@ extension History { message: String, metadata: Logger.Metadata? = nil, source: String? = nil, - file: StaticString = #file, + file: StaticString = #filePath, fileID: String = #fileID, line: UInt = #line) { let source = source ?? Logger.currentModule(fileID: "\(fileID)") @@ -232,7 +232,7 @@ extension History { message: String, metadata: Logger.Metadata? = nil, source: String? = nil, - file: StaticString = #file, + file: StaticString = #filePath, fileID: String = #file, line: UInt = #line) { let source = source ?? Logger.currentModule(fileID: "\(fileID)")