-
Notifications
You must be signed in to change notification settings - Fork 100
Swift 6: complete concurrency checking #825
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
laevandus
wants to merge
22
commits into
develop
Choose a base branch
from
swift-6
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ddf78cc
Use SWIFT_STRICT_CONCURRENCY complete with Swift 5
laevandus b73c9c5
Merge branch 'develop' into swift-6
laevandus 2f64d75
Make view models MainActor and fix isolation for controller delegates…
laevandus 87292cf
Set Swift version to 6
laevandus ab7356d
Constraint and UIDevice errors
laevandus 391b156
Try MainActor Appearance and non-isolated injected values
laevandus 26dd6aa
Upgrade Nuke to 12.8
laevandus ef3bbc0
Fixed all the errors
laevandus bb0ed90
Fix last warnings
laevandus 87fcb5a
Fix Swift 6 warnings in tests
laevandus 994196f
Disable building with Xcode 15
laevandus 4c94da4
Fix tests
laevandus 6b78288
Fix tests
laevandus 8eae0dd
Merge branch 'develop' into swift-6
laevandus 6e1e8c9
Fix build warnings in the demo app
laevandus f10725c
Fix avatar sizes with LazyImage
laevandus c0b9111
Fix UI test where LazyImage now is treated as images, not otherElements
laevandus 79ef1c1
Tidy here and there
laevandus e28503d
Use Swift 6 in the demo app
laevandus f8d9504
Merge branch 'develop' into swift-6
laevandus fa2872a
Fix runtime asserts
laevandus 4b305c5
Fix Gif support which LazyImage dropped
laevandus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ import StreamChatSwiftUI | |
import SwiftUI | ||
|
||
struct ChooseChannelQueryView: View { | ||
static let queryIdentifiers = ChannelListQueryIdentifier.allCases.sorted(using: KeyPathComparator(\.title)) | ||
static var queryIdentifiers: [ChannelListQueryIdentifier] { | ||
ChannelListQueryIdentifier.allCases.sorted(by: { $0.title < $1.title }) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was giving Sendable related error which did not feel right. Just switched to another sorting method. |
||
|
||
var body: some View { | ||
ForEach(Self.queryIdentifiers) { queryIdentifier in | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import StreamChat | |
import StreamChatSwiftUI | ||
import SwiftUI | ||
|
||
class LoginViewModel: ObservableObject { | ||
@MainActor class LoginViewModel: ObservableObject { | ||
|
||
@Published var demoUsers = UserCredentials.builtInUsers | ||
@Published var loading = false | ||
|
@@ -42,7 +42,7 @@ class LoginViewModel: ObservableObject { | |
return | ||
} | ||
|
||
DispatchQueue.main.async { [weak self] in | ||
Task { @MainActor [weak self] in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DispatchQueue gives Sendable error for self |
||
withAnimation { | ||
self?.loading = false | ||
UnsecureRepository.shared.save(user: credentials) | ||
|
@@ -64,7 +64,7 @@ class LoginViewModel: ObservableObject { | |
return | ||
} | ||
|
||
DispatchQueue.main.async { [weak self] in | ||
Task { @MainActor [weak self] in | ||
withAnimation { | ||
self?.loading = false | ||
AppState.shared.userState = .loggedIn | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Xcode 15 builds are going away, disabling it for now and a cleanup happens separately