Skip to content

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Mar 18, 2023

Types that conform to FileSystem either don't have in-memory state to be protected with locks at all and use blocking I/O under the hood (like LocalFileSystem), or already protect their state with locks, like InMemoryFileSystem. Few other types in SwiftPM conforming to FileSystem either also use locks (like GitFileSystemView) or are read-only (like VirtualFileSystem). I'm convinced that adding a Sendable requirement on FileSystem is beneficial overall, since it's already passed around between Dispatch queues and other concurrent code that would allow us to resolve sendability warnings.

@MaxDesiatov MaxDesiatov self-assigned this Mar 18, 2023
@MaxDesiatov MaxDesiatov changed the title Make FileSystem and confirming types as Sendable Make FileSystem and conforming types as Sendable Mar 18, 2023
@MaxDesiatov MaxDesiatov force-pushed the maxd/sendable-filesystem branch from 4d14e6c to e65e182 Compare March 18, 2023 22:24
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov requested a review from weissi March 18, 2023 22:25
Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

looks legit to me!

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) April 12, 2023 16:19
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

1 similar comment
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

@MaxDesiatov MaxDesiatov merged commit a47ef13 into main Apr 13, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/sendable-filesystem branch April 18, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants