File tree 4 files changed +31
-10
lines changed
4 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#### Enhancements
8
8
9
+ * Support compilation with Musl C standard library.
10
+ [ SimplyDanny] ( https://github.com/SimplyDanny )
11
+
9
12
* Build without warnings with Swift 6 compiler.
10
13
[ SimplyDanny] ( https://github.com/SimplyDanny )
11
14
12
15
* Generate docs cleanly with Swift 6 compiler.
13
16
[ John Fairhurst] ( https://github.com/johnfairh )
14
- [ #821 ] (( https://github.com/realm/SourceKitten/issues/821 )
17
+ [ #821 ] ( https://github.com/realm/SourceKitten/issues/821 )
15
18
16
19
* Added new syntax, attribute and declaration kinds introduced in Swift 6.0.
17
20
[ SimplyDanny] ( https://github.com/SimplyDanny )
Original file line number Diff line number Diff line change 1
1
import Foundation
2
+
2
3
#if SWIFT_PACKAGE
3
4
import SourceKit
4
5
#endif
5
6
6
- #if os(Linux)
7
+ #if os(macOS)
8
+ import Darwin
9
+ #elseif os(Linux)
10
+ #if canImport(Glibc)
7
11
import Glibc
12
+ #elseif canImport(Musl)
13
+ import Musl
14
+ #endif
8
15
#elseif os(Windows)
9
16
import ucrt
10
17
#else
11
- import Darwin
18
+ #error("Unsupported platform")
12
19
#endif
13
20
14
21
// MARK: - SourceKitObjectConvertible
@@ -86,7 +93,7 @@ public final class SourceKitObject {
86
93
///
87
94
/// - Parameters:
88
95
/// - value: The new value to add to the dictionary.
89
- /// - key: The key to associate with value. If key already exists in the dictionary,
96
+ /// - key: The key to associate with value. If key already exists in the dictionary,
90
97
/// value replaces the existing associated value. If key isn't already a key of the dictionary
91
98
public func updateValue( _ value: SourceKitObjectConvertible , forKey key: UID ) {
92
99
precondition ( value. sourceKitObject != nil )
Original file line number Diff line number Diff line change @@ -4,12 +4,18 @@ import Foundation
4
4
import SourceKit
5
5
#endif
6
6
7
- #if os(Linux)
7
+ #if os(macOS)
8
+ import Darwin
9
+ #elseif os(Linux)
10
+ #if canImport(Glibc)
8
11
import Glibc
12
+ #elseif canImport(Musl)
13
+ import Musl
14
+ #endif
9
15
#elseif os(Windows)
10
- import CRT
16
+ import ucrt
11
17
#else
12
- import Darwin
18
+ #error("Unsupported platform")
13
19
#endif
14
20
15
21
/// Represents docs for a Swift file.
Original file line number Diff line number Diff line change 1
1
import ArgumentParser
2
- #if canImport(Darwin)
2
+ import Dispatch
3
+
4
+ #if os(macOS)
3
5
import Darwin
4
- #elseif canImport(Glibc)
6
+ #elseif os(Linux)
7
+ #if canImport(Glibc)
5
8
import Glibc
9
+ #elseif canImport(Musl)
10
+ import Musl
11
+ #endif
6
12
#elseif os(Windows)
7
13
import ucrt
8
14
#else
9
15
#error("Unsupported platform")
10
16
#endif
11
- import Dispatch
12
17
13
18
// `sourcekitd_set_notification_handler()` sets the handler to be executed on main thread queue.
14
19
// So, we vacate main thread to `dispatchMain()`.
You can’t perform that action at this time.
0 commit comments