parse-community / Parse-Swift

The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)
https://parseplatform.org
MIT License
308 stars 69 forks source link

fix: async save/create/update/replace use async/await deep save #418

Closed cbaker6 closed 2 years ago

cbaker6 commented 2 years ago

New Pull Request Checklist

Issue Description

Xcode 14 throws purple warnings for hang risk at runtime due to asynchronous save/create/update/replace needing to deep save ParseObject's synchronously. It's okay for synchronous calls to have this warning as developers are choosing to hold the thread (because of the synchronous call), but this should not occur for async calls.

Related issue: #n/a

Approach

TODOs before merging

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this pull request!

codecov[bot] commented 2 years ago

Codecov Report

Base: 90.14% // Head: 90.17% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (965865a) compared to base (085f5ad). Patch coverage: 92.72% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #418 +/- ## ========================================== + Coverage 90.14% 90.17% +0.03% ========================================== Files 159 161 +2 Lines 15322 16189 +867 ========================================== + Hits 13812 14599 +787 - Misses 1510 1590 +80 ``` | [Impacted Files](https://codecov.io/gh/parse-community/Parse-Swift/pull/418?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community) | Coverage Δ | | |---|---|---| | [...s/ParseSwift/Objects/ParseInstallation+async.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VJbnN0YWxsYXRpb24rYXN5bmMuc3dpZnQ=) | `91.74% <82.10%> (-8.26%)` | :arrow_down: | | [Sources/ParseSwift/Objects/ParseUser+async.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VVc2VyK2FzeW5jLnN3aWZ0) | `93.49% <83.15%> (-6.51%)` | :arrow_down: | | [Sources/ParseSwift/Objects/ParseInstallation.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VJbnN0YWxsYXRpb24uc3dpZnQ=) | `86.39% <92.65%> (+0.66%)` | :arrow_up: | | [Sources/ParseSwift/Objects/ParseObject+async.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VPYmplY3QrYXN5bmMuc3dpZnQ=) | `96.57% <94.82%> (-3.43%)` | :arrow_down: | | [Sources/ParseSwift/Objects/ParseUser.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VVc2VyLnN3aWZ0) | `88.12% <96.04%> (+1.02%)` | :arrow_up: | | [Sources/ParseSwift/Objects/ParseObject.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L09iamVjdHMvUGFyc2VPYmplY3Quc3dpZnQ=) | `90.10% <97.17%> (+0.51%)` | :arrow_up: | | [Sources/ParseSwift/API/API+Command+async.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L0FQSS9BUEkrQ29tbWFuZCthc3luYy5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [...ParseSwift/API/API+NonParseBodyCommand+async.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L0FQSS9BUEkrTm9uUGFyc2VCb2R5Q29tbWFuZCthc3luYy5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [Sources/ParseSwift/Types/ParseError.swift](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community#diff-U291cmNlcy9QYXJzZVN3aWZ0L1R5cGVzL1BhcnNlRXJyb3Iuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://codecov.io/gh/parse-community/Parse-Swift/pull/418/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=parse-community)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.