Skip to content

Commit 2b6fde7

Browse files
committed
-
1 parent 1ca38ac commit 2b6fde7

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎Package.swift‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ let package = Package(
5454
),
5555
.product(
5656
name: "SwiftCompilerPlugin",
57-
package: "swift-syntax"
57+
package: "swift-syntax",
58+
condition: .when(platforms: [.macOS])
5859
)
5960
]
6061
),
@@ -68,7 +69,8 @@ let package = Package(
6869
),
6970
.product(
7071
name: "SwiftCompilerPlugin",
71-
package: "swift-syntax"
72+
package: "swift-syntax",
73+
condition: .when(platforms: [.macOS])
7274
)
7375
]
7476
)

‎Sources/RelayMacros/Main/RelayPlugin.swift‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
// Copyright © 2025 Kamil Strzelecki. All rights reserved.
77
//
88

9-
import PrincipleMacros
10-
import SwiftCompilerPlugin
9+
#if canImport(SwiftCompilerPlugin)
10+
import PrincipleMacros
11+
import SwiftCompilerPlugin
1112

12-
@main
13-
internal struct RelayPlugin: CompilerPlugin {
13+
@main
14+
internal struct RelayPlugin: CompilerPlugin {
1415

15-
let providingMacros: [any Macro.Type] = [
16-
PublishableMacro.self,
17-
MemoizedMacro.self
18-
]
19-
}
16+
let providingMacros: [any Macro.Type] = [
17+
PublishableMacro.self,
18+
MemoizedMacro.self
19+
]
20+
}
21+
#endif

0 commit comments

Comments
 (0)