File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,17 @@ public struct UpdateIndexStoreTaskDescription: IndexTaskDescription {
226
226
logger. error ( " Not indexing \( file. forLogging) because it has no compiler arguments " )
227
227
return
228
228
}
229
+ if buildSettings. isFallback {
230
+ // Fallback build settings don’t even have an indexstore path set, so they can't generate index data that we would
231
+ // pick up. Also, indexing with fallback args has some other problems:
232
+ // - If it did generate a unit file, we would consider the file’s index up-to-date even if the compiler arguments
233
+ // change, which means that we wouldn't get any up-to-date-index even when we have build settings for the file.
234
+ // - It's unlikely that the index from a single file with fallback arguments will be very useful as it can't tie
235
+ // into the rest of the project.
236
+ // So, don't index the file.
237
+ logger. error ( " Not indexing \( file. forLogging) because it has fallback compiler arguments " )
238
+ return
239
+ }
229
240
guard let toolchain = await buildSystemManager. toolchain ( for: file. mainFile, language) else {
230
241
logger. error (
231
242
" Not updating index store for \( file. forLogging) because no toolchain could be determined for the document "
You can’t perform that action at this time.
0 commit comments