-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor FXIOS-14485 FXIOS-14472 [Swift 6 Migration] Turn on Swift 6 at the Project Level, as well as Client and ClientTest targets #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
base: cursor_combined_20260121_qodo_grep_cursor_copilot_1_base_refactor_fxios-14485_fxios-14472_swift_6_migration_turn_on_swift_6_at_the_project_level_as_well_as_client_and_clienttest_targets_pr218
Are you sure you want to change the base?
Refactor FXIOS-14485 FXIOS-14472 [Swift 6 Migration] Turn on Swift 6 at the Project Level, as well as Client and ClientTest targets #13
Conversation
…otations: `@escaping @mainactor @Sendable` (matching WKWebView APIs)
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.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| runJavaScriptAlertPanelWithMessage message: String, | ||
| initiatedByFrame frame: WKFrameInfo, | ||
| completionHandler: @escaping @MainActor @Sendable () -> Void | ||
| completionHandler: @escaping @MainActor () -> Void |
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.
Inconsistent @Sendable removal from completion handler
Low Severity
The @Sendable annotation was removed from the completionHandler parameter in runJavaScriptAlertPanelWithMessage, but was kept on the similar runJavaScriptConfirmPanelWithMessage and runJavaScriptTextInputPanelWithPrompt methods in the same file (lines 56 and 71). This creates an inconsistency within the file and mismatches the corresponding implementation in BrowserViewController+WebViewDelegates.swift where all three methods have @Sendable on their completion handlers.
| ViewModel.OnboardingActionType, | ||
| String, | ||
| @escaping (Result<TabAction, Error>) -> Void | ||
| @MainActor @escaping (Result<TabAction, Error>) -> Void |
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.
Missing @Sendable on completion handler type creates mismatch
Medium Severity
The onActionTap closure's completion handler type in OnboardingFlowViewModel was updated to @MainActor @escaping (Result<TabAction, Error>) -> Void but is missing @Sendable. However, OnboardingService.handleAction expects @Sendable @escaping @MainActor (...) on its completion parameter. When completion is passed from the onActionTap closure in LaunchCoordinator to handleAction, there's a type mismatch since the closure typed without @Sendable is being passed where @Sendable is required.
Benchmark PR from qodo-benchmark#218
Note
Swift 6 migration and concurrency safety
SWIFT_VERSION = 6.0across project and test targets@MainActor/@Sendableto numerous callbacks and delegate completion handlers (OnboardingFlowViewModel,OnboardingService, web view delegates, context menu actions, tab provider, autofill accessory, download toast)handleActionin aTaskinLaunchCoordinatorto align with actor isolationMinor UI/behavior adjustments
DownloadToast(removes localUXconstant)BrowserWebControllerhelpers andWebContextMenuActionsProviderfor thread-safe tab operationsWritten by Cursor Bugbot for commit 5371116. Configure here.