Skip to content

Commit

Permalink
Merge pull request #135 from treastrain/change-from-spi-to-package
Browse files Browse the repository at this point in the history
Remove `@_spi import` and add `package` if needed
  • Loading branch information
treastrain authored Feb 4, 2024
2 parents 2836cd0 + 7a14ae7 commit 81d6f7b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions Sources/AssertServices/AssertServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
2 changes: 1 addition & 1 deletion Sources/Core/NFCReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<TagType: NFCTagType> {
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreTests/NFCReaderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreTests/TaskPriority+Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 81d6f7b

Please sign in to comment.