File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Sources/SwiftCompilerPluginMessageHandling Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ public class CompilerPluginMessageHandler<Provider: PluginProvider> {
195
195
)
196
196
}
197
197
return . loadPluginLibraryResult( loaded: diags. isEmpty, diagnostics: diags)
198
+
199
+ case . clearCache:
200
+ syntaxRegistry. clear ( )
201
+ return . clearCacheResult
198
202
}
199
203
}
200
204
}
Original file line number Diff line number Diff line change 12
12
13
13
// NOTE: Types in this file should be self-contained and should not depend on any non-stdlib types.
14
14
15
+ private var _MESSAGE_PROTOCOL_VERSION_NUMBER : Int { 8 } // Added 'clearCache'.
16
+
15
17
@_spi ( PluginMessage)
16
18
public enum HostToPluginMessage : Codable {
17
19
/// Send capability of the host, and get capability of the plugin.
@@ -48,6 +50,9 @@ public enum HostToPluginMessage: Codable {
48
50
libraryPath: String ,
49
51
moduleName: String
50
52
)
53
+
54
+ /// Signal to clear any caches.
55
+ case clearCache
51
56
}
52
57
53
58
@_spi ( PluginMessage)
@@ -78,11 +83,13 @@ public enum PluginToHostMessage: Codable {
78
83
loaded: Bool ,
79
84
diagnostics: [ PluginMessage . Diagnostic ]
80
85
)
86
+
87
+ case clearCacheResult
81
88
}
82
89
83
90
@_spi ( PluginMessage)
84
91
public enum PluginMessage {
85
- public static var PROTOCOL_VERSION_NUMBER : Int { 7 } // Pass extension protocol list
92
+ public static var PROTOCOL_VERSION_NUMBER : Int { _MESSAGE_PROTOCOL_VERSION_NUMBER }
86
93
87
94
public struct HostCapability : Codable {
88
95
var protocolVersion : Int
You can’t perform that action at this time.
0 commit comments