From ff2b3113aa5bf34dbfb1c052c6e318a31043723e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 20 Mar 2021 10:46:21 -0700 Subject: [PATCH] FilePath: enable building on Windows When building on Windows, we rely on the `withPlatformString` to convert the strings to the native platform encoding (UTF-16). The public `FilePath.withPlatformString` is marked as `@_alwaysEmitIntoClient` and references the `_withPlatformString` which is marked as `internal`. Annotate the function as `@usableFromInline` to enable the inlined method to reference this function. --- Sources/System/FilePath/FilePathComponents.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/System/FilePath/FilePathComponents.swift b/Sources/System/FilePath/FilePathComponents.swift index 7bb55d59..d7ca9d47 100644 --- a/Sources/System/FilePath/FilePathComponents.swift +++ b/Sources/System/FilePath/FilePathComponents.swift @@ -190,6 +190,7 @@ extension FilePath.Root: _PathSlice { } } extension FilePath: _PlatformStringable { + @usableFromInline func _withPlatformString(_ body: (UnsafePointer) throws -> Result) rethrows -> Result { try _storage.withPlatformString(body) }