File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Sources/SymbolGraphCompiler Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ extension SSGC.SymbolDump
94
94
95
95
for j : Int in self . vertices. indices
96
96
{
97
- try
98
97
{
99
98
// Deport foreign doccomments.
100
99
if let doccomment: SymbolGraphPart . Vertex . Doccomment = $0. doccomment,
@@ -103,15 +102,18 @@ extension SSGC.SymbolDump
103
102
$0. doccomment = nil
104
103
}
105
104
// Trim file path prefixes.
105
+ // As of 6.1, symbolgraph-extract sometimes emits paths from inside the swift
106
+ // installation directory.
106
107
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)
108
110
else
109
111
{
110
112
$0. location = nil
111
113
return
112
114
}
113
115
114
- try $0. location? . file. rebase ( against : base )
116
+ $0. location? . file = rebased
115
117
116
118
} ( & self . vertices [ j] )
117
119
}
You can’t perform that action at this time.
0 commit comments