From 7a14ae70d0f37fcf1830c385653e1e6a8d176a37 Mon Sep 17 00:00:00 2001 From: treastrain / Tanaka Ryoga Date: Mon, 5 Feb 2024 04:39:25 +0900 Subject: [PATCH] Remove `@_spi import` and add `package` if needed --- Sources/AssertServices/AssertServices.swift | 8 +++----- Sources/Core/NFCReader.swift | 2 +- Tests/CoreTests/NFCReaderTests.swift | 2 +- Tests/CoreTests/TaskPriority+Tests.swift | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Sources/AssertServices/AssertServices.swift b/Sources/AssertServices/AssertServices.swift index bb3ff397..bbb614f9 100644 --- a/Sources/AssertServices/AssertServices.swift +++ b/Sources/AssertServices/AssertServices.swift @@ -7,13 +7,11 @@ import Foundation -@_spi(AssertServices) -@inlinable public func assertionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) { +package func assertionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) { AssertServices.assertionFailureHandler(message(), file, line) } -@_spi(AssertServices) -public struct AssertServices { - public static var assertionFailureHandler: (String, StaticString, UInt) -> () = assertionFailureDefaultHandler +struct AssertServices { + static var assertionFailureHandler: (String, StaticString, UInt) -> () = assertionFailureDefaultHandler static let assertionFailureDefaultHandler = { Swift.assertionFailure($0, file: $1, line: $2) } } diff --git a/Sources/Core/NFCReader.swift b/Sources/Core/NFCReader.swift index 352fbf49..78fc29e5 100644 --- a/Sources/Core/NFCReader.swift +++ b/Sources/Core/NFCReader.swift @@ -5,7 +5,7 @@ // Created by treastrain on 2022/09/24. // -@_spi(AssertServices) import TRETNFCKit_AssertServices +import TRETNFCKit_AssertServices import TRETNFCKit_InfoPListChecker public actor NFCReader { diff --git a/Tests/CoreTests/NFCReaderTests.swift b/Tests/CoreTests/NFCReaderTests.swift index 7f6939d9..3983afe6 100644 --- a/Tests/CoreTests/NFCReaderTests.swift +++ b/Tests/CoreTests/NFCReaderTests.swift @@ -11,7 +11,7 @@ import CoreNFC #endif @testable import TRETNFCKit_Core -@testable @_spi(AssertServices) import TRETNFCKit_AssertServices +@testable import TRETNFCKit_AssertServices final class NFCReaderTests: XCTestCase { override class func setUp() { diff --git a/Tests/CoreTests/TaskPriority+Tests.swift b/Tests/CoreTests/TaskPriority+Tests.swift index d9436ec1..224a2465 100644 --- a/Tests/CoreTests/TaskPriority+Tests.swift +++ b/Tests/CoreTests/TaskPriority+Tests.swift @@ -9,7 +9,7 @@ import Dispatch import Foundation import XCTest -@testable @_spi(TaskPriorityToDispatchQoSClass) import TRETNFCKit_Core +@testable import TRETNFCKit_Core final class TaskPriority_Tests: XCTestCase { func testTaskPriorityDispatchQoSClass() throws {