Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Aug 20, 2024
1 parent a04e290 commit d004b1d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Sources/Frontend/Scan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ final class Scan {

try build(driver)
try index(driver)

// print("ATTACH")
// Thread.sleep(forTimeInterval: 15)

try analyze()
return buildResults()
}
Expand Down
5 changes: 3 additions & 2 deletions Sources/SourceGraph/Mutators/ExtensionReferenceBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ final class ExtensionReferenceBuilder: SourceGraphMutator {
guard let extendedDeclaration = graph.explicitDeclaration(withUsr: extendedTypeReference.usr) else {
// This is an extension on an external type and cannot be folded.
graph.markRetained(extensionDeclaration)
referenceExtendedTypeAliases(of: extendedTypeReference, from: extensionDeclaration)
// referenceExtendedTypeAliases(of: extendedTypeReference, from: extensionDeclaration)
continue
}

referenceExtendedTypeAliases(of: extendedTypeReference, from: extendedDeclaration)
// referenceExtendedTypeAliases(of: extendedTypeReference, from: extendedDeclaration)

// Don't fold protocol extensions as they must be treated differently.
guard kind != .extensionProtocol else { continue }
Expand Down Expand Up @@ -56,6 +56,7 @@ final class ExtensionReferenceBuilder: SourceGraphMutator {

for reference in extendedTypeReferences {
guard let aliasDecl = reference.parent, aliasDecl.kind == .typealias else { continue }
// print(aliasDecl)
for usr in aliasDecl.usrs {
let aliasReference = Reference(kind: .typealias, usr: usr, location: extensionDeclaration.location)
aliasReference.name = aliasDecl.name
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions Sources/SourceGraph/SourceGraphMutatorRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Shared

public final class SourceGraphMutatorRunner {
public static func perform(graph: SourceGraph) throws {
// SourceGraphDebugger(graph: graph).describeGraph()
try self.init(graph: graph).perform()
}

Expand Down

0 comments on commit d004b1d

Please sign in to comment.