File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed
Sources/IssueReporting/IssueReporters Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 28
28
- name : Run tests
29
29
run : make test-${{ matrix.config }}
30
30
31
+ library-evolution :
32
+ name : Library evolution
33
+ runs-on : macos-14
34
+ steps :
35
+ - uses : actions/checkout@v4
36
+ - name : Select Xcode
37
+ run : sudo xcode-select -s /Applications/Xcode_15.4.app
38
+ - name : Run tests
39
+ run : make build-for-library-evolution
40
+
31
41
examples :
32
42
strategy :
33
43
matrix :
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ test-wasm:
31
31
build-for-static-stdlib :
32
32
@swift build -c $(CONFIG ) --static-swift-stdlib
33
33
34
+ build-for-library-evolution :
35
+ swift build \
36
+ -c release \
37
+ --target IssueReporting \
38
+ -Xswiftc -emit-module-interface \
39
+ -Xswiftc -enable-library-evolution
40
+
34
41
format :
35
42
@swift format \
36
43
--ignore-unparsable-files \
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ public struct RuntimeWarningReporter: IssueReporter {
30
30
#endif
31
31
@usableFromInline var dso : UnsafeRawPointer
32
32
33
- #if canImport(Darwin)
34
- @_transparent
35
- #endif
33
+ init ( dso: UnsafeRawPointer ) {
34
+ self . dso = dso
35
+ }
36
+
36
37
@usableFromInline
37
38
init ( ) {
38
39
// NB: Xcode runtime warnings offer a much better experience than traditional assertions and
@@ -41,18 +42,18 @@ public struct RuntimeWarningReporter: IssueReporter {
41
42
//
42
43
// Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc
43
44
let count = _dyld_image_count ( )
44
- self . dso = #dsohandle
45
45
for i in 0 ..< count {
46
46
if let name = _dyld_get_image_name ( i) {
47
47
let swiftString = String ( cString: name)
48
48
if swiftString. hasSuffix ( " /SwiftUI " ) {
49
49
if let header = _dyld_get_image_header ( i) {
50
- self . dso = UnsafeRawPointer ( header)
50
+ self . init ( dso: UnsafeRawPointer ( header) )
51
51
return
52
52
}
53
53
}
54
54
}
55
55
}
56
+ self . init ( dso: #dsohandle)
56
57
}
57
58
#endif
58
59
You can’t perform that action at this time.
0 commit comments