Skip to content

Update to Swift 6#252

Merged
jkmassel merged 1 commit intotrunkfrom
update/to-swift-6
Dec 9, 2025
Merged

Update to Swift 6#252
jkmassel merged 1 commit intotrunkfrom
update/to-swift-6

Conversation

@jkmassel
Copy link
Contributor

@jkmassel jkmassel commented Dec 8, 2025

What?

What it says in the title

Why?

Concurrency safety, and #250

How?

Just a few little changes.

Testing Instructions

If this compiles, it should be fine.

@jkmassel jkmassel requested a review from kean December 8, 2025 23:31
@jkmassel jkmassel self-assigned this Dec 8, 2025
for item in items {
group.addTask {
do {
let item = try await self.fileManager.import(item)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Multiple operations like this are competing for many of the same resources (network and Disk IO) so I'm not sure parallelizing them here is much of a win.

If you don't love this I can try something new, this was just a quick fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like I generated this code I have no memory of it. I do not like unbounded parallelization for sure.

For file operations, it's largely irrelevant. I'm not sure if there may be scenarios where it needs to trigger download of the original data from the cloud. In that case, you probably want to trigger them all at once and Apple will presumably take care of the networking and limiting the requests.

for item in items {
group.addTask {
do {
let item = try await self.fileManager.import(item)
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like I generated this code I have no memory of it. I do not like unbounded parallelization for sure.

For file operations, it's largely irrelevant. I'm not sure if there may be scenarios where it needs to trigger download of the original data from the cloud. In that case, you probably want to trigger them all at once and Apple will presumably take care of the networking and limiting the requests.

@jkmassel jkmassel merged commit be87855 into trunk Dec 9, 2025
11 checks passed
@jkmassel jkmassel deleted the update/to-swift-6 branch December 9, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants