-
Notifications
You must be signed in to change notification settings - Fork 221
chore(build): fix build warnings for swift 6 experimental features #4041
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
chore(build): fix build warnings for swift 6 experimental features #4041
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses build warnings for Swift 6 experimental features by resolving strict concurrency checking issues throughout the Amplify Swift codebase.
- Adds
@preconcurrency
imports to suppress concurrency warnings for modules not yet fully concurrency-safe - Changes mutable static properties to immutable (
var
tolet
) where appropriate - Adds
@unchecked Sendable
conformance to classes that are inherently thread-safe but don't formally conform toSendable
Reviewed Changes
Copilot reviewed 249 out of 249 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
AmplifyTests/CoreTests/*.swift | Added @preconcurrency imports and @unchecked Sendable conformances for test classes |
AmplifyTestCommon/Models/**/*.swift | Added @preconcurrency import Amplify throughout model schema files |
AmplifyPlugins/**/*.swift | Added @preconcurrency imports for Combine, Amplify, and other modules; changed static var to let |
AmplifyPlugins/Auth/Sources/**/*.swift | Added @unchecked Sendable conformances and nonisolated(unsafe) for static properties |
AmplifyPlugins/API/Sources/**/*.swift | Updated generic constraints to include Sendable requirements for Decodable types |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/ActivityTrackerTests.swift
Outdated
Show resolved
Hide resolved
...yPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOrchestrator.swift
Show resolved
Hide resolved
AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/CustomEndpoint/EndpointResolving.swift
Outdated
Show resolved
Hide resolved
AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Endpoint/EndpointClient.swift
Show resolved
Hide resolved
AmplifyPlugins/API/Sources/AWSAPIPlugin/Support/Decode/GraphQLResponseDecoder.swift
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4041 +/- ##
==========================================
- Coverage 67.80% 67.79% -0.02%
==========================================
Files 1129 1129
Lines 52478 52482 +4
==========================================
- Hits 35585 35578 -7
- Misses 16893 16904 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…4041) * chore(build): fix build warnings for swift 6 experimental features * chore: add @unchecked Sendable conformances and nonisolated modifiers * chore: fix swiftlint errors * chore: add @preconcurrency attribute for module imports * chore: add more preconcurrency attributes * chore: add preconcurrency to model generated files * chore: fix failing unit test * chore: revert ActivityTracker changes * chore: update EndpointResolving * chore: resolve swiftlint error
Issue #
None
Description
This PR contains changes for resolving build warnings for following experimental features introduced in Swift 6:
General Checklist
Given When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.