Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 21, 2026

Benchmark PR from qodo-benchmark#220


Note

Swift 6 migration and concurrency updates

  • Upgrade Package.swift to tools 6.2; remove experimental flags (StrictConcurrency, RegionBasedIsolation, InferSendableFromCaptures) across targets
  • Set SWIFT_VERSION = 6.0 for ShareTo-related Xcode build configurations in project.pbxproj
  • Update ExecutableContentBlockingGenerator to use nonisolated(unsafe) static generator to address thread-safety (FXIOS-14548)

Tests and API adjustments

  • Convert async tests to synchronous style; replace await fulfillment(...) with wait(for: ...)
  • Add @Sendable to decision handler closures and adjust call sites; remove @MainActor from mock server helper
  • LabelButtonHeaderView.configure now takes a @Sendable @MainActor action and wraps it before passing to ActionButtonViewModel

Written by Cursor Bugbot for commit 5439cb2. Configure here.

Copy link

@cursor cursor bot left a 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.

XCTAssertEqual(result.originalData, imageData)
XCTAssertEqual(result.url, mockedURL)
XCTAssertEqual(result.image.size, expectedRasterSize)
exp.fulfill()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test missing expectation for async callback assertions

Medium Severity

The testDownloadingSVGImage_withKingfisherProcessor_forStandardSVGCase test removed all expectation handling while other tests in the same file retained theirs. The downloadImage call is asynchronous (network download), but the test no longer waits for the completion callback. The assertions inside the callback (XCTAssertEqual for originalData, url, and image.size) will never execute before the test completes, causing the test to pass without verifying anything.

Fix in Cursor Fix in Web

throw MockImageServerError.noAssetData
}

// GDCWebServer must be initialized for the first time on the main thread
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed crash-preventing @mainactor from GCDWebServer initialization

Low Severity

The @MainActor annotation was removed from startMockImageServer along with a comment explicitly documenting that "GDCWebServer must be initialized for the first time on the main thread" and that the annotation "ensures that if this test file is run alone it will not crash." Since the test class is @unchecked Sendable (not @MainActor isolated), there's no guarantee tests run on the main thread in Swift 6, potentially causing intermittent crashes during test execution.

Fix in Cursor Fix in Web

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.

3 participants