Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ package func triggerLayoutWithWindow(
vc.triggerLayout()
window = vc.view.window
}
#if os(macOS)
window.isReleasedWhenClosed = false
window.close()
#endif
withExtendedLifetime(window) {}
}

Expand All @@ -57,6 +61,10 @@ package func triggerLayoutWithWindow(
vc.triggerLayout()
window = vc.view.window
}
#if os(macOS)
window.isReleasedWhenClosed = false
window.close()
#endif
withExtendedLifetime(window) {}
}

Expand All @@ -73,6 +81,10 @@ package func triggerLayoutWithWindow(
window = vc.view.window
}
}
#if os(macOS)
window.isReleasedWhenClosed = false
window.close()
#endif
withExtendedLifetime(window) {}
}

Expand All @@ -89,6 +101,10 @@ package func triggerLayoutWithWindow(
window = vc.view.window
}
}
#if os(macOS)
window.isReleasedWhenClosed = false
window.close()
#endif
withExtendedLifetime(window) {}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Testing
import Foundation
import OpenSwiftUITestsSupport

@MainActor
struct AppearanceActionModifierCompatibilityTests {
Copy link

Copilot AI Aug 16, 2025

Choose a reason for hiding this comment

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

The @MainActor attribute was removed from this test struct. According to the coding guidelines, test structures should maintain proper isolation when dealing with UI components. Since this test involves appearance actions which typically require main actor isolation, consider whether this removal is intentional or if it might cause concurrency issues.

Copilot uses AI. Check for mistakes.
@Test
func appear() async throws {
Expand Down Expand Up @@ -70,12 +69,7 @@ struct AppearanceActionModifierCompatibilityTests {
)
)
}
#if os(macOS)
// FIXME: NSHostingView is not dealloc here
// See #454
#expect(Helper.result == "AAD")
#else
#expect(Helper.result == "AADD")
#endif

await #expect(Helper.result == "AADD")
Copy link

Copilot AI Aug 16, 2025

Choose a reason for hiding this comment

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

The await keyword is used with #expect which is not an async function. This will cause a compilation error. Remove the await keyword.

Suggested change
await #expect(Helper.result == "AADD")
#expect(Helper.result == "AADD")

Copilot uses AI. Check for mistakes.
}
}