Skip to content
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

Draft: Fix strict concurrency warnings #58

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kevin-kp
Copy link
Contributor

This PR is an effort to fix the strict concurrency warnings when adding the swift setting StrictConcurrency (not included in the commit).
You can test this by adding the following to the necessary targets:

swiftSettings: [
    .enableExperimentalFeature("StrictConcurrency")
]

The only two warnings that are left are HTTPBodyEncoder and HTTPBodyDecoder.
This is because Sendable conformance is iOS >= 16.0 for JSONEncoder and JSONDecoder and I'm not sure what the best approach is to resolve these two warnings.

@kevin-kp kevin-kp marked this pull request as draft June 12, 2024 11:03
@joshuawright11
Copy link
Owner

joshuawright11 commented Jun 12, 2024

Thanks @kevin-kp! Great work 💯 couple Qs for you - (caveat - I haven't dived into Sendable a ton yet so they may just be misunderstandings on my part.)

Regarding JSONEncoder - would a @preconcurrency import Foundation work for versions less than iOS 16?

@joshuawright11
Copy link
Owner

LGTM - feel free to change from Draft to Open and I'll approve

# Conflicts:
#	Papyrus/Sources/PapyrusRequest.swift
#	Papyrus/Sources/PapyrusResponse.swift
@kevin-kp
Copy link
Contributor Author

@joshuawright11 it actually isn't ready yet as the Provider is still not Sendable (which i'm currently getting warnings from).

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.

None yet

2 participants