File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed
Sources/SwiftDriver/IncrementalCompilation
ModuleDependencyGraphParts Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -138,4 +138,4 @@ extension DictionaryOfDictionaries {
138
138
139
139
// MARK: - identity
140
140
141
- extension DictionaryOfDictionaries : Equatable where Value: Equatable { }
141
+ extension DictionaryOfDictionaries : Equatable where Value: Equatable { }
Original file line number Diff line number Diff line change @@ -914,3 +914,35 @@ extension Diagnostic.Message {
914
914
}
915
915
}
916
916
917
+ // MARK: - Checking Serialization
918
+
919
+ extension ModuleDependencyGraph {
920
+ func matches( _ other: ModuleDependencyGraph ) -> Bool {
921
+ guard nodeFinder. matches ( other. nodeFinder) ,
922
+ tracedNodes. matches ( other. tracedNodes) ,
923
+ sourceSwiftDepsMap. matches ( other. sourceSwiftDepsMap) ,
924
+ externalDependencies. matches ( other. externalDependencies)
925
+ else {
926
+ return false
927
+ }
928
+ return true
929
+ }
930
+ }
931
+
932
+ extension Set where Element == ModuleDependencyGraph . Node {
933
+ fileprivate func matches( _ other: Self ) -> Bool {
934
+ self == other
935
+ }
936
+ }
937
+
938
+ extension BidirectionalMap where T1 == TypedVirtualPath , T2 == ModuleDependencyGraph . SwiftDeps {
939
+ fileprivate func matches( _ other: Self ) -> Bool {
940
+ self == other
941
+ }
942
+ }
943
+
944
+ extension Set where Element == ExternalDependency {
945
+ fileprivate func matches( _ other: Self ) -> Bool {
946
+ self == other
947
+ }
948
+ }
Original file line number Diff line number Diff line change @@ -248,3 +248,10 @@ fileprivate extension ModuleDependencyGraph.DependencySource {
248
248
file. name
249
249
}
250
250
}
251
+
252
+ // MARK: - Checking Serialization
253
+ extension ModuleDependencyGraph . NodeFinder {
254
+ func matches( _ other: Self ) -> Bool {
255
+ nodeMap == other. nodeMap && usesByDef == other. usesByDef
256
+ }
257
+ }
You can’t perform that action at this time.
0 commit comments