Skip to content

Exclude .DS_Store and .orig files from cache tracking#1622

Open
kimjune01 wants to merge 3 commits into
yonaskolb:masterfrom
kimjune01:fix/ds-store-cache-invalidation
Open

Exclude .DS_Store and .orig files from cache tracking#1622
kimjune01 wants to merge 3 commits into
yonaskolb:masterfrom
kimjune01:fix/ds-store-cache-invalidation

Conversation

@kimjune01
Copy link
Copy Markdown

@kimjune01 kimjune01 commented May 13, 2026

Summary

  • Filters .DS_Store and .orig files from allTrackedFiles, matching the exclusions already present in SourceGenerator
  • Without this, changes to .DS_Store files (created by macOS Finder) cause spurious project regeneration even when no real sources changed
  • Adds tests verifying exclusion works for both source directories and file groups

Fixes #1032

Test plan

  • swift test -- all tests pass, including new testAllTrackedFilesExcludesIgnoredFiles
  • Tests use NSTemporaryDirectory to avoid polluting the repo
  • Verified .DS_Store and .orig are excluded while normal files (.swift, .png) are tracked

Hypothesis graph

Reasoning trace and prior evidence: https://github.com/kimjune01/sweep/blob/master/repo-hypotheses/yonaskolb-XcodeGen.md

kimjune01 added 3 commits May 12, 2026 21:08
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.DS_Store files in cache

1 participant