Skip to content

Commit d17277b

Browse files
committed
wip: port to system, same module separate folders
1 parent 74bc402 commit d17277b

34 files changed

Lines changed: 3591 additions & 1159 deletions

Package.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,26 @@ let swiftSettings = swiftSettingsAvailability + swiftSettingsCI + [
8585
.define("SYSTEM_PACKAGE"),
8686
.define("ENABLE_MOCKING", .when(configuration: .debug)),
8787
.enableExperimentalFeature("Lifetimes"),
88+
// --- SE-0529 FilePath port ---
89+
// Settings folded in for the base (Sources/System/FilePath) and the compat
90+
// layer (Sources/System/SystemFilePath), mirroring the prep repo's separate
91+
// FilePath + SystemFilePath targets now that they share one module.
92+
//
93+
// Defines the `SwiftStdlib 9999` availability token every base decl carries.
94+
.enableExperimentalFeature(
95+
"AvailabilityMacro=SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999"),
96+
// Selects the base's real per-platform resolve() syscall branch and its own
97+
// _internalInvariant, instead of the stdlib SwiftShims stub branch.
98+
.define("FILEPATH_PACKAGE"),
99+
// swift-system historically ships a non-failable FilePath(_: String); the
100+
// base's is failable and the two can't coexist on one type. This makes the
101+
// base drop its public failable init?(_:) so the compat layer's non-failable
102+
// init(_:) is the sole one (see FilePathStringBridging.swift / the compat
103+
// FilePathString.swift PORT note).
104+
.define("FILEPATH_SYSTEM_STRING_COMPAT"),
105+
// The base is 9999-gated; the swift-system substrate that calls it is not.
106+
// Disable enforcement (matches the prep's consumer targets).
107+
.unsafeFlags(["-Xfrontend", "-disable-availability-checking"]),
88108
]
89109

90110
let cSettings: [CSetting] = [

Sources/System/CMakeLists.txt

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,30 @@ set_target_properties(SystemPackage PROPERTIES
2323
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
2424
target_sources(SystemPackage PRIVATE
2525
FilePath/FilePath.swift
26-
FilePath/FilePathComponents.swift
26+
FilePath/FilePathAnchor.swift
27+
FilePath/FilePathCodeUnits.swift
28+
FilePath/FilePathComponent.swift
2729
FilePath/FilePathComponentView.swift
30+
FilePath/FilePathDarwin.swift
31+
FilePath/FilePathDecomposition.swift
32+
FilePath/FilePathInternals.swift
2833
FilePath/FilePathParsing.swift
29-
FilePath/FilePathString.swift
30-
FilePath/FilePathSyntax.swift
34+
FilePath/FilePathResolve.swift
35+
FilePath/FilePathStringBridging.swift
36+
FilePath/FilePathSystemString.swift
3137
FilePath/FilePathWindows.swift)
38+
target_sources(SystemPackage PRIVATE
39+
SystemFilePath/FilePathCompatInternals.swift
40+
SystemFilePath/FilePathCompatShims.swift
41+
SystemFilePath/FilePathComponentCompat.swift
42+
SystemFilePath/FilePathComponents.swift
43+
SystemFilePath/FilePathConformances.swift
44+
SystemFilePath/FilePathString.swift
45+
SystemFilePath/FilePathSyntax.swift
46+
SystemFilePath/FilePathTemp.swift
47+
SystemFilePath/FilePathTempPosix.swift
48+
SystemFilePath/FilePathTempWindows.swift
49+
SystemFilePath/SystemStringShim.swift)
3250
target_sources(SystemPackage PRIVATE
3351
Internals/Backcompat.swift
3452
Internals/CInterop.swift

0 commit comments

Comments
 (0)