Skip to content

Commit efb8777

Browse files
committed
disable sanity check that can no longer be guaranteed in Swift 6.1
1 parent d035672 commit efb8777

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Sources/SymbolGraphCompiler/SSGC.SymbolDump.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ extension SSGC.SymbolDump
9494

9595
for j:Int in self.vertices.indices
9696
{
97-
try
9897
{
9998
// Deport foreign doccomments.
10099
if let doccomment:SymbolGraphPart.Vertex.Doccomment = $0.doccomment,
@@ -103,15 +102,18 @@ extension SSGC.SymbolDump
103102
$0.doccomment = nil
104103
}
105104
// Trim file path prefixes.
105+
// As of 6.1, symbolgraph-extract sometimes emits paths from inside the swift
106+
// installation directory.
106107
guard
107-
let base:Symbol.FileBase = copy base
108+
let base:Symbol.FileBase = copy base,
109+
let rebased:Symbol.File = try? $0.location?.file.rebased(against: base)
108110
else
109111
{
110112
$0.location = nil
111113
return
112114
}
113115

114-
try $0.location?.file.rebase(against: base)
116+
$0.location?.file = rebased
115117

116118
} (&self.vertices[j])
117119
}

0 commit comments

Comments
 (0)