Skip to content

Enable Strict Concurrency mode #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Enable Strict Concurrency mode #13

merged 3 commits into from
Aug 2, 2024

Conversation

emildzwonek
Copy link
Collaborator

  • Enable strict concurrency mode
  • Bump minimal OS versions (required by swift-tools-version:5.10)
  • Tweak codebase to build with strict concurrency mode without warnings

@@ -60,23 +60,23 @@ extension URLSession {
method: HTTPMethod,
parameters: ParametersEncoding?,
headers: HTTPHeaders?,
decoder: DataDecoder
decoder: @autoclosure @escaping @Sendable () -> DataDecoder
Copy link
Collaborator

Choose a reason for hiding this comment

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

does it have to be escaping here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, removed

}

// MARK: - Private

private static func handle<T: Decodable>(
response: HTTPURLResponse,
data: Data,
decoder: DataDecoder,
decoder: @autoclosure @escaping @Sendable () -> DataDecoder,
Copy link
Collaborator

Choose a reason for hiding this comment

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

and here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, removed

.tvOS(.v11),
.macOS(.v13),
.iOS(.v12),
.tvOS(.v12),

Choose a reason for hiding this comment

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

why not V15?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just bumped it to the oldest recommended version. We won't get any benefit from v15 here, v16 would make a difference

@emildzwonek emildzwonek force-pushed the strict-concurrency branch 2 times, most recently from cc97651 to e62bd32 Compare August 2, 2024 10:12
@emildzwonek emildzwonek merged commit 1890c27 into master Aug 2, 2024
1 check passed
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.

4 participants