File tree 3 files changed +34
-9
lines changed
SwiftSyntaxMacrosTestSupport 3 files changed +34
-9
lines changed Original file line number Diff line number Diff line change 12
12
// NOTE: This basic plugin mechanism is mostly copied from
13
13
// https://github.com/apple/swift-package-manager/blob/main/Sources/PackagePlugin/Plugin.swift
14
14
15
- @_implementationOnly import Foundation
16
- @_implementationOnly import SwiftCompilerPluginMessageHandling
17
15
import SwiftSyntaxMacros
18
16
17
+ #if swift(>=5.11)
18
+ private import Foundation
19
+ private import SwiftCompilerPluginMessageHandling
20
+ #else
21
+ import Foundation
22
+ import SwiftCompilerPluginMessageHandling
23
+ #endif
24
+
19
25
#if os(Windows)
20
- @_implementationOnly import ucrt
26
+ #if swift(>=5.11)
27
+ private import ucrt
28
+ #else
29
+ import ucrt
30
+ #endif
21
31
#endif
22
32
23
33
//
@@ -167,8 +177,8 @@ extension CompilerPlugin {
167
177
}
168
178
169
179
internal struct PluginHostConnection : MessageConnection {
170
- let inputStream : FileHandle
171
- let outputStream : FileHandle
180
+ fileprivate let inputStream : FileHandle
181
+ fileprivate let outputStream : FileHandle
172
182
173
183
func sendMessage< TX: Encodable > ( _ message: TX ) throws {
174
184
// Encode the message as JSON.
Original file line number Diff line number Diff line change 10
10
//
11
11
//===----------------------------------------------------------------------===//
12
12
13
+ #if swift(>=5.11)
13
14
#if canImport(Darwin)
14
- @ _implementationOnly import Darwin
15
+ private import Darwin
15
16
#elseif canImport(Glibc)
16
- @ _implementationOnly import Glibc
17
+ private import Glibc
17
18
#elseif canImport(Musl)
18
- @_implementationOnly import Musl
19
+ private import Musl
20
+ #endif
21
+ #else
22
+ #if canImport(Darwin)
23
+ import Darwin
24
+ #elseif canImport(Glibc)
25
+ import Glibc
26
+ #elseif canImport(Musl)
27
+ import Musl
28
+ #endif
19
29
#endif
20
30
21
31
/// Represent a string.
Original file line number Diff line number Diff line change @@ -17,9 +17,14 @@ import SwiftParserDiagnostics
17
17
import SwiftSyntax
18
18
import SwiftSyntaxMacroExpansion
19
19
import SwiftSyntaxMacros
20
- import XCTest
21
20
import _SwiftSyntaxTestSupport
22
21
22
+ #if swift(>=5.11)
23
+ private import XCTest
24
+ #else
25
+ import XCTest
26
+ #endif
27
+
23
28
// MARK: - Note
24
29
25
30
/// Describes a diagnostic note that tests expect to be created by a macro expansion.
You can’t perform that action at this time.
0 commit comments