Skip to content

Conversation

@jakepetroules
Copy link
Collaborator

Use the same technique being proposed in SwiftSystem and partly-implemented in Foundation.

As a follow-on change, we also need to stop using POSIX filesystem APIs, which are not Unicode or long path aware.

@jakepetroules jakepetroules added the windows Support for the Windows platform label Apr 19, 2025
@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules jakepetroules requested a review from compnerd April 19, 2025 18:55
@jakepetroules
Copy link
Collaborator Author

Same approach as in apple/swift-system#226

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I think that the FSProxy is better adjusted to simply use Foundation's FileManager for these operations rather than re-implementing them.

@jakepetroules
Copy link
Collaborator Author

Sure, I can do that for the FSProxy bits. Still need our own copy of "withNTPathRepresentation" for LoadLibraryW and any other Win32 APIs we might need to directly call in future which don't have Foundation analogues.

I also fixed up the path handling in Foundation itself, take a look: swiftlang/swift-foundation#1257

@jakepetroules
Copy link
Collaborator Author

Moved the FSProxy changes into #427, as far as existing code goes, this is now just the one-line change to LoadLibraryW.

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules
Copy link
Collaborator Author

@swift-ci test

Use the same technique being proposed in SwiftSystem and partly-implemented in Foundation.

As a follow-on change, we also need to stop using POSIX filesystem APIs, which are not Unicode or long path aware.
@jakepetroules
Copy link
Collaborator Author

@swift-ci test

@jakepetroules jakepetroules merged commit ac358da into main Apr 23, 2025
3 checks passed
@jakepetroules jakepetroules deleted the windows-paths branch April 23, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Support for the Windows platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants