Skip to content

Commit 7e445e6

Browse files
authored
Merge pull request #84526 from hnrklssn/swiftify-package-swift
[Swiftify] add Package.swift to enable LSP
2 parents 57379dc + a3e81ce commit 7e445e6

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

lib/Macros/Package.swift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// swift-tools-version: 6.2
2+
3+
// Although this could in theory be used to build macros, it's not actually wired up to CMake.
4+
// This is here purely to provide LSP IDE features when working on Swift macros.
5+
6+
import PackageDescription
7+
import CompilerPluginSupport
8+
9+
let package = Package(
10+
name: "SwiftifyImport",
11+
platforms: [.macOS(.v11), .iOS(.v15), .tvOS(.v15), .watchOS(.v8)],
12+
products: [
13+
.library(
14+
name: "SwiftifyImport",
15+
targets: [
16+
"SwiftifyImport"
17+
]
18+
),
19+
.library(
20+
name: "SwiftifyImportMacro",
21+
targets: [
22+
"SwiftifyImportMacro"
23+
]
24+
)
25+
],
26+
dependencies: [
27+
.package(path: "../../../swift-syntax")
28+
],
29+
targets: [
30+
.macro(
31+
name: "SwiftifyImportMacro",
32+
dependencies: [
33+
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
34+
.product(name: "SwiftDiagnostics", package: "swift-syntax"),
35+
.product(name: "SwiftParser", package: "swift-syntax"),
36+
.product(name: "SwiftSyntax", package: "swift-syntax"),
37+
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
38+
.product(name: "SwiftSyntaxMacro", package: "swift-syntax")
39+
]
40+
),
41+
.target(
42+
name: "SwiftifyImport",
43+
dependencies: ["SwiftifyImportMacro"]
44+
)
45+
]
46+
)

0 commit comments

Comments
 (0)