Skip to content

Commit 989ab32

Browse files
committed
Try a different workaround
1 parent 071c975 commit 989ab32

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

Sources/Testing/ABI/EntryPoints/ABIEntryPoint.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ extension ABIv0 {
5555
}
5656
}
5757

58+
#if !SWT_FIXED_SWIFTPM_8111 && os(Windows)
59+
@_spi(__Workaround8111)
60+
@_cdecl("swt_abiv0_getEntryPoint")
61+
public func abiv0_getEntryPoint() -> UnsafeRawPointer {
62+
unsafeBitCast(ABIv0.entryPoint, to: UnsafeRawPointer.self)
63+
}
64+
#else
5865
/// An exported C function that is the equivalent of
5966
/// ``ABIv0/entryPoint-swift.type.property``.
6067
///
@@ -64,6 +71,7 @@ extension ABIv0 {
6471
@usableFromInline func abiv0_getEntryPoint() -> UnsafeRawPointer {
6572
unsafeBitCast(ABIv0.entryPoint, to: UnsafeRawPointer.self)
6673
}
74+
#endif
6775

6876
#if !SWT_NO_SNAPSHOT_TYPES
6977
// MARK: - Xcode 16 Beta 1 compatibility

Sources/Testing/Issues/Issue+Recording.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ extension Issue {
199199
#endif
200200
@usableFromInline nonisolated(unsafe) var failureBreakpointValue = 0
201201

202+
#if !SWT_FIXED_SWIFTPM_8111 && os(Windows)
203+
@inline(never)
204+
@_spi(__Workaround8111)
205+
func failureBreakpoint() {
206+
failureBreakpointValue = 0
207+
}
208+
#else
202209
/// A function called by the testing library when a failure occurs.
203210
///
204211
/// Whenever a test failure (specifically, a non-known ``Issue``) is recorded,
@@ -232,3 +239,4 @@ func failureBreakpoint() {
232239
// cannot be optimized away.
233240
failureBreakpointValue = 0
234241
}
242+
#endif

Tests/TestingTests/MiscellaneousTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12+
#if !SWT_FIXED_SWIFTPM_8111 && os(Windows)
13+
@testable @_spi(__Workaround8111) import Testing
14+
#endif
1215

1316
@Test(/* name unspecified */ .hidden)
1417
@Sendable func freeSyncFunction() {}

0 commit comments

Comments
 (0)