From 926018921b0e98ec6b4d0a21458889cfa7ea4514 Mon Sep 17 00:00:00 2001 From: Mark Villacampa Date: Tue, 17 Dec 2024 18:42:02 +0100 Subject: [PATCH] Use #file instead of #fileID to avoid including the full path in the compiled binary (#4605) --- RevenueCatUI/Helpers/Logger.swift | 10 +++++----- Sources/Error Handling/Assertions.swift | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RevenueCatUI/Helpers/Logger.swift b/RevenueCatUI/Helpers/Logger.swift index bc3840d6cc..b4dae10759 100644 --- a/RevenueCatUI/Helpers/Logger.swift +++ b/RevenueCatUI/Helpers/Logger.swift @@ -19,7 +19,7 @@ enum Logger { static func verbose( _ text: CustomStringConvertible, - file: String = #file, + file: String = #fileID, function: String = #function, line: UInt = #line ) { @@ -35,7 +35,7 @@ enum Logger { static func debug( _ text: CustomStringConvertible, - file: String = #file, + file: String = #fileID, function: String = #function, line: UInt = #line ) { @@ -50,7 +50,7 @@ enum Logger { static func warning( _ text: CustomStringConvertible, - file: String = #file, + file: String = #fileID, function: String = #function, line: UInt = #line ) { @@ -65,7 +65,7 @@ enum Logger { static func error( _ text: CustomStringConvertible, - file: String = #file, + file: String = #fileID, function: String = #function, line: UInt = #line ) { @@ -81,7 +81,7 @@ enum Logger { private static func log( _ text: CustomStringConvertible, _ level: LogLevel, - file: String = #file, + file: String = #fileID, function: String = #function, line: UInt = #line ) { diff --git a/Sources/Error Handling/Assertions.swift b/Sources/Error Handling/Assertions.swift index 9f93155ac3..837c34967b 100644 --- a/Sources/Error Handling/Assertions.swift +++ b/Sources/Error Handling/Assertions.swift @@ -19,7 +19,7 @@ import Foundation func RCTestAssert( _ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String, - file: StaticString = #file, + file: StaticString = #fileID, line: UInt = #line ) { #if DEBUG @@ -32,7 +32,7 @@ func RCTestAssert( @inline(__always) func RCTestAssertNotMainThread( function: StaticString = #function, - file: StaticString = #file, + file: StaticString = #fileID, line: UInt = #line ) { #if DEBUG