diff --git a/Package.resolved b/Package.resolved index 48c07b6..2e54b37 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-syntax.git", "state" : { - "revision" : "74203046135342e4a4a627476dd6caf8b28fe11b", - "version" : "509.0.0" + "revision" : "43c802fb7f96e090dde015344a94b5e85779eff1", + "version" : "509.1.0" } } ], diff --git a/Package.swift b/Package.swift index f198a73..0e9b91f 100644 --- a/Package.swift +++ b/Package.swift @@ -29,15 +29,18 @@ import CompilerPluginSupport let package = Package( name: "ReactBridge", - platforms: [.macOS(.v10_15), .iOS(.v12), .tvOS(.v12), .watchOS(.v4), .macCatalyst(.v13)], + platforms: [ + .iOS(.v13), + .macOS(.v10_15), + .tvOS(.v13), + .visionOS(.v1), + .watchOS(.v6) + ], products: [ - .library( - name: "ReactBridge", - targets: ["ReactBridge"] - ) + .library(name: "ReactBridge", targets: ["ReactBridge"]) ], dependencies: [ - .package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"), + .package(url: "https://github.com/apple/swift-syntax.git", from: "509.1.0") ], targets: [ .macro( @@ -54,7 +57,10 @@ let package = Package( .target(name: "RegisterModules"), .testTarget( name: "ReactBridgeTests", - dependencies: ["ReactBridgeMacros", "ReactBridge", .product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")] + dependencies: [ + "ReactBridgeMacros", + .product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax") + ] ), ], swiftLanguageVersions: [.v5] diff --git a/Tests/ReactBridgeTests/ReactBridgeTests.swift b/Tests/ReactBridgeTests/ReactBridgeTests.swift index e4e0922..4862ada 100644 --- a/Tests/ReactBridgeTests/ReactBridgeTests.swift +++ b/Tests/ReactBridgeTests/ReactBridgeTests.swift @@ -1,8 +1,12 @@ import SwiftSyntaxMacros import SwiftSyntaxMacrosTestSupport import XCTest -@testable import ReactBridgeMacros +// Macro implementations build for the host, so the corresponding module is not available when cross-compiling. +// Cross-compiled tests may still make use of the macro itself in end-to-end tests. +#if DEBUG && canImport(ReactBridgeMacros) + +@testable import ReactBridgeMacros final class ReactMethodTests: XCTestCase { @@ -736,3 +740,4 @@ final class ReactViewTests: XCTestCase { } } +#endif