File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Sources/IssueReporting/IssueReporters Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,10 @@ format:
32
32
--in-place \
33
33
--recursive \
34
34
.
35
+ test-linux :
36
+ docker run \
37
+ --rm \
38
+ -v " $( PWD) :$( PWD) " \
39
+ -w " $( PWD) " \
40
+ swift:5.10 \
41
+ bash -c ' swift test'
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ extension IssueReporter where Self == RuntimeWarningReporter {
12
12
///
13
13
/// If this issue reporter receives an expected issue, it will log an info-level message to the
14
14
/// console, instead.
15
+ #if canImport(Darwin)
15
16
@_transparent
17
+ #endif
16
18
public static var runtimeWarning : Self { Self ( ) }
17
19
}
18
20
@@ -23,10 +25,14 @@ extension IssueReporter where Self == RuntimeWarningReporter {
23
25
public struct RuntimeWarningReporter : IssueReporter {
24
26
#if canImport(os)
25
27
@UncheckedSendable
28
+ #if canImport(Darwin)
26
29
@_transparent
30
+ #endif
27
31
@usableFromInline var dso : UnsafeRawPointer
28
32
33
+ #if canImport(Darwin)
29
34
@_transparent
35
+ #endif
30
36
@usableFromInline
31
37
init ( ) {
32
38
// NB: Xcode runtime warnings offer a much better experience than traditional assertions and
@@ -35,6 +41,7 @@ public struct RuntimeWarningReporter: IssueReporter {
35
41
//
36
42
// Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc
37
43
let count = _dyld_image_count ( )
44
+ self . dso = #dsohandle
38
45
for i in 0 ..< count {
39
46
if let name = _dyld_get_image_name ( i) {
40
47
let swiftString = String ( cString: name)
@@ -46,7 +53,6 @@ public struct RuntimeWarningReporter: IssueReporter {
46
53
}
47
54
}
48
55
}
49
- self . dso = #dsohandle
50
56
}
51
57
#endif
52
58
You can’t perform that action at this time.
0 commit comments