Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/System/FilePath/FilePathComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ extension FilePath.Root: _PathSlice {
}
}
extension FilePath: _PlatformStringable {
@usableFromInline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lorentey we will need to version this for Darwin binary distribution, but otherwise I think this is an ok workaround.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding @usableFromInline would introduce this as ABI, which we don't actually need/want to do on Darwin. (Its availability wouldn't match the rest of FilePath, making it inconvenient.)

I'll try to figure out an alternative solution. I'm not sure why the caller needs to be marked @_alwaysEmitIntoClient on Windows, for example.

func _withPlatformString<Result>(_ body: (UnsafePointer<CInterop.PlatformChar>) throws -> Result) rethrows -> Result {
try _storage.withPlatformString(body)
}
Expand Down