Skip to content

Conversation

@hila-f-qodo
Copy link

@hila-f-qodo hila-f-qodo commented Jan 26, 2026

Benchmark PR from qodo-benchmark#226


Open with Devin

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

super.setUp()
override func setUp() async throws {
try await super.setUp()
DependencyHelperMock().bootstrapDependencies()

Choose a reason for hiding this comment

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

🔴 Missing await when calling @mainactor method from non-@mainactor async context

In LaunchScreenViewModelTests.swift, the bootstrapDependencies() method is called without await in the async setUp() method, but the method is now marked with @MainActor.

Click to expand

Issue Details

The DependencyHelperMock.bootstrapDependencies() method was changed to be marked with @MainActor (see DependencyHelperMock.swift:11-12):

@MainActor
func bootstrapDependencies(...)

However, LaunchScreenViewModelTests is NOT marked with @MainActor at the class level, yet it calls bootstrapDependencies() without await in line 19:

override func setUp() async throws {
    try await super.setUp()
    DependencyHelperMock().bootstrapDependencies()  // Missing await!
    ...
}

Compare with LaunchTypeTests.swift:14 which correctly uses await:

await DependencyHelperMock().bootstrapDependencies()

Impact

This will cause a Swift concurrency error because calling a @MainActor method from a non-@MainActor async context requires await. The test will either fail to compile under strict concurrency checking or exhibit undefined behavior at runtime.

Recommendation: Add await before DependencyHelperMock().bootstrapDependencies() on line 19, changing it to await DependencyHelperMock().bootstrapDependencies()

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

4 participants