|
9 | 9 | // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
10 | 10 | //
|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 |
| -@_implementationOnly import Yams |
| 12 | +import Foundation |
13 | 13 |
|
14 |
| -public struct SourceFileDependencyGraph: Codable { |
| 14 | +public struct SourceFileDependencyGraph { |
15 | 15 | public static let sourceFileProvidesInterfaceSequenceNumber: Int = 0
|
16 | 16 | public static let sourceFileProvidesImplementationSequenceNumber: Int = 1
|
17 | 17 |
|
| 18 | + public var majorVersion: UInt64 |
| 19 | + public var minorVersion: UInt64 |
| 20 | + public var compilerVersionString: String |
18 | 21 | private var allNodes: [Node]
|
19 | 22 |
|
20 | 23 | public var sourceFileNodePair: (interface: Node, implementation: Node) {
|
@@ -47,20 +50,14 @@ public struct SourceFileDependencyGraph: Codable {
|
47 | 50 | }
|
48 | 51 | return true
|
49 | 52 | }
|
50 |
| - |
51 |
| - public init(contents: String) throws { |
52 |
| - let decoder = YAMLDecoder() |
53 |
| - self = try decoder.decode(Self.self, from: contents) |
54 |
| - assert(verify()) |
55 |
| - } |
56 | 53 | }
|
57 | 54 |
|
58 |
| -public enum DeclAspect: String, Codable { |
| 55 | +public enum DeclAspect: UInt64 { |
59 | 56 | case interface, implementation
|
60 | 57 | }
|
61 | 58 |
|
62 |
| -public struct DependencyKey: Codable { |
63 |
| - public enum Kind: String, Codable { |
| 59 | +public struct DependencyKey { |
| 60 | + public enum Kind: UInt64 { |
64 | 61 | case topLevel
|
65 | 62 | case nominal
|
66 | 63 | case potentialMember
|
@@ -88,9 +85,8 @@ public struct DependencyKey: Codable {
|
88 | 85 | }
|
89 | 86 | }
|
90 | 87 |
|
91 |
| - |
92 | 88 | extension SourceFileDependencyGraph {
|
93 |
| - public struct Node: Codable { |
| 89 | + public struct Node { |
94 | 90 | public var key: DependencyKey
|
95 | 91 | public var fingerprint: String?
|
96 | 92 | public var sequenceNumber: Int
|
|
0 commit comments