Skip to content

Commit 2d00d94

Browse files
committed
[Swiftify] Fix Package.swift
Swift packages are normally in `Sources/<target-name>`, but SwiftifyImportMacro is in `Sources/SwiftMacros`, and SwiftifyImport is in `<root>/stdlib/public/core`, which is outside the package root. This sets the correct path for SwiftifyImportMacro, and creates a directory `Sources/PublicCorePortal` with a symlink to `SwiftifyImport.swift`. It also enables LifetimeDependence for SwiftifyImport. These changes are purely to provide information to SourceKit - this file isn't actually used by CMake.
1 parent d653b0c commit 2d00d94

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/Macros/Package.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ let package = Package(
3535
.product(name: "SwiftParser", package: "swift-syntax"),
3636
.product(name: "SwiftSyntax", package: "swift-syntax"),
3737
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
38-
.product(name: "SwiftSyntaxMacro", package: "swift-syntax")
39-
]
38+
.product(name: "SwiftSyntaxMacros", package: "swift-syntax")
39+
],
40+
path: "Sources/SwiftMacros",
4041
),
4142
.target(
4243
name: "SwiftifyImport",
43-
dependencies: ["SwiftifyImportMacro"]
44+
dependencies: ["SwiftifyImportMacro"],
45+
path: "Sources/PublicCorePortal",
46+
swiftSettings: [.enableExperimentalFeature("LifetimeDependence")],
4447
)
4548
]
4649
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../stdlib/public/core/SwiftifyImport.swift

0 commit comments

Comments
 (0)