Exclude .DS_Store and .orig files from cache tracking#1622
Open
kimjune01 wants to merge 3 commits into
Open
Conversation
Resolves yonaskolb#1032 — .DS_Store files in the cache cause spurious project regeneration. The source generator already excludes these files, but allTrackedFiles (used by CacheFile) does not. This commit adds a test that asserts .DS_Store and .orig files are excluded from allTrackedFiles. The test fails on the current implementation.
allTrackedFiles now filters out the same files that SourceGenerator already excludes from project generation. Previously, .DS_Store files appearing in source directories would invalidate the cache and trigger a full project regeneration even though nothing in the generated project would change. Resolves yonaskolb#1032
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.DS_Storeand.origfiles fromallTrackedFiles, matching the exclusions already present inSourceGenerator.DS_Storefiles (created by macOS Finder) cause spurious project regeneration even when no real sources changedFixes #1032
Test plan
swift test-- all tests pass, including newtestAllTrackedFilesExcludesIgnoredFilesNSTemporaryDirectoryto avoid polluting the repo.DS_Storeand.origare excluded while normal files (.swift,.png) are trackedHypothesis graph
Reasoning trace and prior evidence: https://github.com/kimjune01/sweep/blob/master/repo-hypotheses/yonaskolb-XcodeGen.md