Skip to content

Commit 82964cf

Browse files
committed
Conjure up an output file path so that indexing of two files produces different unit files
1 parent 5206343 commit 82964cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/SemanticIndex/UpdateIndexStoreTaskDescription.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ private func adjustSwiftCompilerArgumentsForIndexStoreUpdate(
296296
result += [
297297
"-index-file",
298298
"-index-file-path", fileToIndex.pseudoPath,
299-
"-disable-batch-mode", // batch mode is not compatible with -index-file
299+
// batch mode is not compatible with -index-file
300+
"-disable-batch-mode",
301+
// Fake an output path so that we get a different unit file for every Swift file we background index
302+
"-o", fileToIndex.pseudoPath + ".o",
300303
]
301304
return result
302305
}

0 commit comments

Comments
 (0)