From d600f5b98fbde00764a2297f52844ba673c8241a Mon Sep 17 00:00:00 2001 From: Ian Leitch Date: Sat, 28 Dec 2024 18:12:42 +0000 Subject: [PATCH] Don't throw an error when a source file does not exist, closes #858 --- CHANGELOG.md | 2 +- Sources/Indexer/SourceFileCollector.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4cdc534..64137af18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ##### Bug Fixes -- None. +- A clean build is no longer required when a file is deleted from the scanned project. ## 3.0.0 (2024-12-27) diff --git a/Sources/Indexer/SourceFileCollector.swift b/Sources/Indexer/SourceFileCollector.swift index 8df3b33c4..e6b793619 100644 --- a/Sources/Indexer/SourceFileCollector.swift +++ b/Sources/Indexer/SourceFileCollector.swift @@ -1,7 +1,6 @@ import Configuration import Foundation import Logger -import Shared import SourceGraph import SwiftIndexStore import SystemPackage @@ -43,7 +42,8 @@ public struct SourceFileCollector { if !isExcluded(file) { guard file.exists else { - throw PeripheryError.pathDoesNotExist(path: file.string) + logger.debug("Source file does not exist: \(file.string)") + return nil } let module = try indexStore.moduleName(for: unit)