[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.
This commit is contained in:
Henrik G. Olsson
2025-10-10 16:52:24 -07:00
parent d653b0ccd0
commit 2d00d94189
2 changed files with 7 additions and 3 deletions

View File

@@ -35,12 +35,15 @@ let package = Package(
.product(name: "SwiftParser", package: "swift-syntax"),
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacro", package: "swift-syntax")
]
.product(name: "SwiftSyntaxMacros", package: "swift-syntax")
],
path: "Sources/SwiftMacros",
),
.target(
name: "SwiftifyImport",
dependencies: ["SwiftifyImportMacro"]
dependencies: ["SwiftifyImportMacro"],
path: "Sources/PublicCorePortal",
swiftSettings: [.enableExperimentalFeature("LifetimeDependence")],
)
]
)

View File

@@ -0,0 +1 @@
../../../../stdlib/public/core/SwiftifyImport.swift