Skip to content

Commit 950a14d

Browse files
committed
update script
1 parent 4cb11cd commit 950a14d

38 files changed

+51263
-136
lines changed

Package.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// swift-tools-version: 5.10
1+
// swift-tools-version: 6.0
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import CompilerPluginSupport
55
import PackageDescription
66

77
let package = Package(
88
name: "MacroKit",
9-
platforms: [.macOS(.v11), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .macCatalyst(.v13)],
9+
platforms: [.macOS(.v11), .iOS(.v15), .tvOS(.v15), .watchOS(.v6), .macCatalyst(.v13)],
1010
products: [
1111
// Products define the executables and libraries a package produces, making them visible to other packages.
1212
.library(
@@ -20,7 +20,7 @@ let package = Package(
2020
],
2121
dependencies: [
2222
// Depend on the Swift 5.9 release of SwiftSyntax
23-
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.1"),
23+
// .package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.1"),
2424
],
2525
targets: [
2626
// Targets are the basic building blocks of a package, defining a module or a test suite.

Sources/Implementation/Expression/LoggingExpressionMacros.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import SwiftSyntaxWrapper
12
import SwiftDiagnostics
23
import SwiftSyntax
34
import SwiftSyntaxMacroExpansion

XCFramework/SwiftSyntaxWrapper.xcframework/Info.plist

+18-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,31 @@
88
<key>BinaryPath</key>
99
<string>libSwiftSyntaxWrapper.a</string>
1010
<key>LibraryIdentifier</key>
11-
<string>macos-arm64</string>
11+
<string>ios-arm64-simulator</string>
1212
<key>LibraryPath</key>
1313
<string>libSwiftSyntaxWrapper.a</string>
1414
<key>SupportedArchitectures</key>
1515
<array>
1616
<string>arm64</string>
1717
</array>
1818
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
22+
</dict>
23+
<dict>
24+
<key>BinaryPath</key>
25+
<string>libSwiftSyntaxWrapper.a</string>
26+
<key>LibraryIdentifier</key>
27+
<string>macos-arm64_x86_64</string>
28+
<key>LibraryPath</key>
29+
<string>libSwiftSyntaxWrapper.a</string>
30+
<key>SupportedArchitectures</key>
31+
<array>
32+
<string>arm64</string>
33+
<string>x86_64</string>
34+
</array>
35+
<key>SupportedPlatform</key>
1936
<string>macos</string>
2037
</dict>
2138
</array>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
3+
// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Onone -enable-experimental-feature DebugDescriptionMacro -module-name SwiftBasicFormat
4+
import Swift
5+
import SwiftSyntax
6+
import _Concurrency
7+
import _StringProcessing
8+
import _SwiftConcurrencyShims
9+
open class BasicFormat : SwiftSyntax.SyntaxRewriter {
10+
final public let indentationWidth: SwiftSyntax.Trivia
11+
public var indentationStack: [(indentation: SwiftSyntax.Trivia, isUserDefined: Swift.Bool)]
12+
public var currentIndentationLevel: SwiftSyntax.Trivia {
13+
get
14+
}
15+
#if compiler(>=5.3) && $NoncopyableGenerics
16+
public init(indentationWidth: SwiftSyntax.Trivia? = nil, initialIndentation: SwiftSyntax.Trivia = [], viewMode: SwiftSyntax.SyntaxTreeViewMode = .sourceAccurate)
17+
#else
18+
public init(indentationWidth: SwiftSyntax.Trivia? = nil, initialIndentation: SwiftSyntax.Trivia = [], viewMode: SwiftSyntax.SyntaxTreeViewMode = .sourceAccurate)
19+
#endif
20+
#if compiler(>=5.3) && $NoncopyableGenerics
21+
public func increaseIndentationLevel(to userDefinedIndentation: SwiftSyntax.Trivia? = nil)
22+
#else
23+
public func increaseIndentationLevel(to userDefinedIndentation: SwiftSyntax.Trivia? = nil)
24+
#endif
25+
public func decreaseIndentationLevel()
26+
override open func visit(_ node: SwiftSyntax.UnexpectedNodesSyntax) -> SwiftSyntax.UnexpectedNodesSyntax
27+
override open func visitPre(_ node: SwiftSyntax.Syntax)
28+
override open func visitPost(_ node: SwiftSyntax.Syntax)
29+
open var inferInitialTokenIndentation: Swift.Bool {
30+
get
31+
}
32+
open func requiresIndent(_ node: some SyntaxProtocol) -> Swift.Bool
33+
#if compiler(>=5.3) && $NoncopyableGenerics
34+
open func requiresNewline(between first: SwiftSyntax.TokenSyntax?, and second: SwiftSyntax.TokenSyntax?) -> Swift.Bool
35+
#else
36+
open func requiresNewline(between first: SwiftSyntax.TokenSyntax?, and second: SwiftSyntax.TokenSyntax?) -> Swift.Bool
37+
#endif
38+
#if compiler(>=5.3) && $NoncopyableGenerics
39+
open func requiresWhitespace(between first: SwiftSyntax.TokenSyntax?, and second: SwiftSyntax.TokenSyntax?) -> Swift.Bool
40+
#else
41+
open func requiresWhitespace(between first: SwiftSyntax.TokenSyntax?, and second: SwiftSyntax.TokenSyntax?) -> Swift.Bool
42+
#endif
43+
open func isMutable(_ token: SwiftSyntax.TokenSyntax) -> Swift.Bool
44+
#if compiler(>=5.3) && $NoncopyableGenerics
45+
open func transformTokenText(_ token: SwiftSyntax.TokenSyntax) -> Swift.String?
46+
#else
47+
open func transformTokenText(_ token: SwiftSyntax.TokenSyntax) -> Swift.String?
48+
#endif
49+
#if compiler(>=5.3) && $NoncopyableGenerics
50+
open func transformTokenPresence(_ token: SwiftSyntax.TokenSyntax) -> SwiftSyntax.SourcePresence?
51+
#else
52+
open func transformTokenPresence(_ token: SwiftSyntax.TokenSyntax) -> SwiftSyntax.SourcePresence?
53+
#endif
54+
override open func visit(_ token: SwiftSyntax.TokenSyntax) -> SwiftSyntax.TokenSyntax
55+
@objc deinit
56+
}
57+
extension SwiftSyntax.TokenSyntax {
58+
public var indentationOfLine: SwiftSyntax.Trivia {
59+
get
60+
}
61+
}
62+
extension SwiftSyntax.SyntaxProtocol {
63+
public func formatted(using format: SwiftBasicFormat.BasicFormat = BasicFormat()) -> SwiftSyntax.Syntax
64+
}
65+
extension SwiftSyntax.Trivia {
66+
#if compiler(>=5.3) && $NoncopyableGenerics
67+
public func indentation(isOnNewline: Swift.Bool) -> SwiftSyntax.Trivia?
68+
#else
69+
public func indentation(isOnNewline: Swift.Bool) -> SwiftSyntax.Trivia?
70+
#endif
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
3+
// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Onone -enable-experimental-feature DebugDescriptionMacro -module-name SwiftCompilerPlugin
4+
import Foundation
5+
import Swift
6+
import SwiftCompilerPluginMessageHandling
7+
import SwiftSyntaxMacros
8+
import _Concurrency
9+
import _StringProcessing
10+
import _SwiftConcurrencyShims
11+
public protocol CompilerPlugin {
12+
init()
13+
var providingMacros: [any SwiftSyntaxMacros.Macro.Type] { get }
14+
}
15+
extension SwiftCompilerPlugin.CompilerPlugin {
16+
#if compiler(>=5.3) && $NoncopyableGenerics
17+
public func _resolveMacro(moduleName: Swift.String, typeName: Swift.String) -> (any SwiftSyntaxMacros.Macro.Type)?
18+
#else
19+
public func _resolveMacro(moduleName: Swift.String, typeName: Swift.String) -> (any SwiftSyntaxMacros.Macro.Type)?
20+
#endif
21+
}
22+
extension SwiftCompilerPlugin.CompilerPlugin {
23+
public static func main() throws
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
3+
// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Onone -enable-experimental-feature DebugDescriptionMacro -module-name SwiftCompilerPluginMessageHandling
4+
import Swift
5+
import SwiftBasicFormat
6+
import SwiftDiagnostics
7+
import SwiftOperators
8+
import SwiftParser
9+
import SwiftSyntax
10+
import SwiftSyntaxMacroExpansion
11+
import SwiftSyntaxMacros
12+
import _Concurrency
13+
import _StringProcessing
14+
import _SwiftConcurrencyShims
15+
public enum PluginFeature : Swift.String {
16+
case loadPluginLibrary
17+
#if compiler(>=5.3) && $NoncopyableGenerics
18+
public init?(rawValue: Swift.String)
19+
#else
20+
public init?(rawValue: Swift.String)
21+
#endif
22+
public typealias RawValue = Swift.String
23+
public var rawValue: Swift.String {
24+
get
25+
}
26+
}
27+
public protocol PluginProvider {
28+
#if compiler(>=5.3) && $NoncopyableGenerics
29+
func resolveMacro(moduleName: Swift.String, typeName: Swift.String) -> (any SwiftSyntaxMacros.Macro.Type)?
30+
#else
31+
func resolveMacro(moduleName: Swift.String, typeName: Swift.String) -> (any SwiftSyntaxMacros.Macro.Type)?
32+
#endif
33+
func loadPluginLibrary(libraryPath: Swift.String, moduleName: Swift.String) throws
34+
var features: [SwiftCompilerPluginMessageHandling.PluginFeature] { get }
35+
}
36+
public protocol MessageConnection {
37+
func sendMessage<TX>(_ message: TX) throws where TX : Swift.Encodable
38+
#if compiler(>=5.3) && $NoncopyableGenerics
39+
func waitForNextMessage<RX>(_ type: RX.Type) throws -> RX? where RX : Swift.Decodable
40+
#else
41+
func waitForNextMessage<RX>(_ type: RX.Type) throws -> RX? where RX : Swift.Decodable
42+
#endif
43+
}
44+
public class CompilerPluginMessageHandler<Connection, Provider> where Connection : SwiftCompilerPluginMessageHandling.MessageConnection, Provider : SwiftCompilerPluginMessageHandling.PluginProvider {
45+
public init(connection: Connection, provider: Provider)
46+
@objc deinit
47+
}
48+
extension SwiftCompilerPluginMessageHandling.CompilerPluginMessageHandler {
49+
public func main() throws
50+
}
51+
extension SwiftCompilerPluginMessageHandling.PluginProvider {
52+
public var features: [SwiftCompilerPluginMessageHandling.PluginFeature] {
53+
get
54+
}
55+
public func loadPluginLibrary(libraryPath: Swift.String, moduleName: Swift.String) throws
56+
}
57+
public enum HostToPluginMessage : Swift.Codable {
58+
case getCapability(capability: SwiftCompilerPluginMessageHandling.PluginMessage.HostCapability?)
59+
case expandFreestandingMacro(macro: SwiftCompilerPluginMessageHandling.PluginMessage.MacroReference, macroRole: SwiftCompilerPluginMessageHandling.PluginMessage.MacroRole? = nil, discriminator: Swift.String, syntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax)
60+
case expandAttachedMacro(macro: SwiftCompilerPluginMessageHandling.PluginMessage.MacroReference, macroRole: SwiftCompilerPluginMessageHandling.PluginMessage.MacroRole, discriminator: Swift.String, attributeSyntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax, declSyntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax, parentDeclSyntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax?, extendedTypeSyntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax?, conformanceListSyntax: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax?)
61+
case loadPluginLibrary(libraryPath: Swift.String, moduleName: Swift.String)
62+
public func encode(to encoder: any Swift.Encoder) throws
63+
public init(from decoder: any Swift.Decoder) throws
64+
}
65+
public enum PluginToHostMessage : Swift.Codable {
66+
case getCapabilityResult(capability: SwiftCompilerPluginMessageHandling.PluginMessage.PluginCapability)
67+
case expandMacroResult(expandedSource: Swift.String?, diagnostics: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic])
68+
case expandFreestandingMacroResult(expandedSource: Swift.String?, diagnostics: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic])
69+
case expandAttachedMacroResult(expandedSources: [Swift.String]?, diagnostics: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic])
70+
case loadPluginLibraryResult(loaded: Swift.Bool, diagnostics: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic])
71+
public func encode(to encoder: any Swift.Encoder) throws
72+
public init(from decoder: any Swift.Decoder) throws
73+
}
74+
public enum PluginMessage {
75+
public static var PROTOCOL_VERSION_NUMBER: Swift.Int {
76+
get
77+
}
78+
public struct HostCapability : Swift.Codable {
79+
public init(protocolVersion: Swift.Int)
80+
public func encode(to encoder: any Swift.Encoder) throws
81+
public init(from decoder: any Swift.Decoder) throws
82+
}
83+
public struct PluginCapability : Swift.Codable {
84+
public var protocolVersion: Swift.Int
85+
public var features: [Swift.String]?
86+
#if compiler(>=5.3) && $NoncopyableGenerics
87+
public init(protocolVersion: Swift.Int, features: [Swift.String]? = nil)
88+
#else
89+
public init(protocolVersion: Swift.Int, features: [Swift.String]? = nil)
90+
#endif
91+
public func encode(to encoder: any Swift.Encoder) throws
92+
public init(from decoder: any Swift.Decoder) throws
93+
}
94+
public struct MacroReference : Swift.Codable {
95+
public var moduleName: Swift.String
96+
public var typeName: Swift.String
97+
public var name: Swift.String
98+
public init(moduleName: Swift.String, typeName: Swift.String, name: Swift.String)
99+
public func encode(to encoder: any Swift.Encoder) throws
100+
public init(from decoder: any Swift.Decoder) throws
101+
}
102+
public enum MacroRole : Swift.String, Swift.Codable {
103+
case expression
104+
case declaration
105+
case accessor
106+
case memberAttribute
107+
case member
108+
case peer
109+
case conformance
110+
case codeItem
111+
case `extension`
112+
#if compiler(>=5.3) && $NoncopyableGenerics
113+
public init?(rawValue: Swift.String)
114+
#else
115+
public init?(rawValue: Swift.String)
116+
#endif
117+
public typealias RawValue = Swift.String
118+
public var rawValue: Swift.String {
119+
get
120+
}
121+
}
122+
public struct SourceLocation : Swift.Codable {
123+
public var fileID: Swift.String
124+
public var fileName: Swift.String
125+
public var offset: Swift.Int
126+
public var line: Swift.Int
127+
public var column: Swift.Int
128+
public init(fileID: Swift.String, fileName: Swift.String, offset: Swift.Int, line: Swift.Int, column: Swift.Int)
129+
public func encode(to encoder: any Swift.Encoder) throws
130+
public init(from decoder: any Swift.Decoder) throws
131+
}
132+
public struct Diagnostic : Swift.Codable {
133+
public enum Severity : Swift.String, Swift.Codable {
134+
case error
135+
case warning
136+
case note
137+
case remark
138+
#if compiler(>=5.3) && $NoncopyableGenerics
139+
public init?(rawValue: Swift.String)
140+
#else
141+
public init?(rawValue: Swift.String)
142+
#endif
143+
public typealias RawValue = Swift.String
144+
public var rawValue: Swift.String {
145+
get
146+
}
147+
}
148+
public struct Position : Swift.Codable {
149+
public var fileName: Swift.String
150+
public var offset: Swift.Int
151+
public init(fileName: Swift.String, offset: Swift.Int)
152+
public static var invalid: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Position {
153+
get
154+
}
155+
public func encode(to encoder: any Swift.Encoder) throws
156+
public init(from decoder: any Swift.Decoder) throws
157+
}
158+
public struct PositionRange : Swift.Codable {
159+
public var fileName: Swift.String
160+
public var startOffset: Swift.Int
161+
public var endOffset: Swift.Int
162+
public init(fileName: Swift.String, startOffset: Swift.Int, endOffset: Swift.Int)
163+
public static var invalid: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.PositionRange {
164+
get
165+
}
166+
public func encode(to encoder: any Swift.Encoder) throws
167+
public init(from decoder: any Swift.Decoder) throws
168+
}
169+
public struct Note : Swift.Codable {
170+
public var position: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Position
171+
public var message: Swift.String
172+
public init(position: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Position, message: Swift.String)
173+
public func encode(to encoder: any Swift.Encoder) throws
174+
public init(from decoder: any Swift.Decoder) throws
175+
}
176+
public struct FixIt : Swift.Codable {
177+
public struct Change : Swift.Codable {
178+
public var range: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.PositionRange
179+
public var newText: Swift.String
180+
public func encode(to encoder: any Swift.Encoder) throws
181+
public init(from decoder: any Swift.Decoder) throws
182+
}
183+
public var message: Swift.String
184+
public var changes: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.FixIt.Change]
185+
public func encode(to encoder: any Swift.Encoder) throws
186+
public init(from decoder: any Swift.Decoder) throws
187+
}
188+
public var message: Swift.String
189+
public var severity: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Severity
190+
public var position: SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Position
191+
public var highlights: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.PositionRange]
192+
public var notes: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Note]
193+
public var fixIts: [SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.FixIt]
194+
public func encode(to encoder: any Swift.Encoder) throws
195+
public init(from decoder: any Swift.Decoder) throws
196+
}
197+
public struct Syntax : Swift.Codable {
198+
public enum Kind : Swift.String, Swift.Codable {
199+
case declaration
200+
case statement
201+
case expression
202+
case type
203+
case pattern
204+
case attribute
205+
#if compiler(>=5.3) && $NoncopyableGenerics
206+
public init?(rawValue: Swift.String)
207+
#else
208+
public init?(rawValue: Swift.String)
209+
#endif
210+
public typealias RawValue = Swift.String
211+
public var rawValue: Swift.String {
212+
get
213+
}
214+
}
215+
public var kind: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax.Kind
216+
public var source: Swift.String
217+
public var location: SwiftCompilerPluginMessageHandling.PluginMessage.SourceLocation
218+
public init(kind: SwiftCompilerPluginMessageHandling.PluginMessage.Syntax.Kind, source: Swift.String, location: SwiftCompilerPluginMessageHandling.PluginMessage.SourceLocation)
219+
public func encode(to encoder: any Swift.Encoder) throws
220+
public init(from decoder: any Swift.Decoder) throws
221+
}
222+
}
223+
extension SwiftCompilerPluginMessageHandling.PluginFeature : Swift.Equatable {}
224+
extension SwiftCompilerPluginMessageHandling.PluginFeature : Swift.Hashable {}
225+
extension SwiftCompilerPluginMessageHandling.PluginFeature : Swift.RawRepresentable {}
226+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Severity : Swift.Equatable {}
227+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Severity : Swift.Hashable {}
228+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Diagnostic.Severity : Swift.RawRepresentable {}
229+
extension SwiftCompilerPluginMessageHandling.PluginMessage.MacroRole : Swift.Equatable {}
230+
extension SwiftCompilerPluginMessageHandling.PluginMessage.MacroRole : Swift.Hashable {}
231+
extension SwiftCompilerPluginMessageHandling.PluginMessage.MacroRole : Swift.RawRepresentable {}
232+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Syntax.Kind : Swift.Equatable {}
233+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Syntax.Kind : Swift.Hashable {}
234+
extension SwiftCompilerPluginMessageHandling.PluginMessage.Syntax.Kind : Swift.RawRepresentable {}

0 commit comments

Comments
 (0)