Skip to content

Conversation

daveinglis
Copy link
Contributor

LocalFS was using some posix APIs (stat, mkdir, chmod, chown, etc) with some being used in Windows which mean long filenames would fail in some cases, this cleans that up making all platforms that same

@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis
Copy link
Contributor Author

@swift-ci test

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you express this as return fileAttrs[.type] == FileAttributeType.typeRegular to avoid the force cast?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get Cannot convert value of type '(any Sendable)?' to expected argument type 'FileAttributeType'

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the value be any Sendable & any Equatable? I think that might allow simplifying:

return NSDictionary(dictionary: lhs.fileAttrs).isEqual(NSDictionary(dictionary: rhs.fileAttrs))

to

return lhs.fileAttrs == rhs.fileAttrs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya, I have tried this, I get Type 'any Equatable & Sendable' cannot conform to 'Equatable'``. I'm not sure what Im missing...

Copy link
Collaborator

Choose a reason for hiding this comment

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

:(

@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis marked this pull request as ready for review June 9, 2025 14:23
@daveinglis
Copy link
Contributor Author

@swift-ci test linux

@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis
Copy link
Contributor Author

@swift-ci test

Copy link
Collaborator

@jakepetroules jakepetroules left a comment

Choose a reason for hiding this comment

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

This will break the build on FreeBSD (see inline comment)

@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis requested a review from jakepetroules June 10, 2025 13:28
LocalFS was using some posix APIs (stat, mkdir, chmod, chown, etc)
with some being used in Windows which mean long filenames would fail in
some cases, this cleans that up making all platforms that same
@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis
Copy link
Contributor Author

@swift-ci test linux

@daveinglis
Copy link
Contributor Author

@swift-ci test linux

@owenv owenv merged commit 1b2d827 into swiftlang:main Jun 11, 2025
24 checks passed
@daveinglis daveinglis deleted the localfs_updates branch July 16, 2025 13:31
@jakepetroules jakepetroules added the windows Support for the Windows platform label Aug 4, 2025
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.

3 participants