Skip to content

Let the test folder add its own files - #163

Merged
andiwand merged 1 commit into
mainfrom
sync-the-test-folder
Aug 16, 2026
Merged

Let the test folder add its own files#163
andiwand merged 1 commit into
mainfrom
sync-the-test-folder

Conversation

@andiwand

@andiwand andiwand commented Aug 16, 2026

Copy link
Copy Markdown
Member

A colleague suggested we generate the Xcode project with xcodegen instead of committing it. I looked into it and the trade doesn't work for us — Dependabot updates our Swift packages by editing project.pbxproj directly, Package.resolved lives inside the .xcodeproj so the pins would go with it, and xcodegen 2.41 doesn't know about synchronized folders, which is the mechanism that already keeps our project file quiet.

What was left of the churn was one narrow thing, and this fixes that instead.

The app folders have been synchronized groups for a while, so adding a source file takes no project edit. The test folder was still a hand-written list, and every test or fixture we added cost four lines of made-up object ids — 8eba37e, c353ccc, 589f4f7, d1956df are all that and nothing else. It's a synchronized group now too.

Two things had to move out of the folder first, since a synchronized group copies whatever is left in it into the bundle:

  • fixtures/make-fixtures.pyscripts/make-test-fixtures.py. It would otherwise be bundled as a resource, along with any __pycache__ left behind by running it.
  • Info.plist is gone, replaced by GENERATE_INFOPLIST_FILE. It held nothing but build-setting placeholders, and dropping it means the folder needs no membership exception.

Checked:

  • The full suite passes on the simulator, fixture-dependent tests included, and the built .xctest holds exactly the six sample documents it held before — no strays, and the generated Info.plist carries the same identity keys the stub did.
  • A throwaway test file compiled and ran with no change to project.pbxproj, which is the whole point.
  • The generator still writes correct fixtures from its new home: the regenerated test.pdf is byte-identical, and the zips differ only in timestamps.

README updated — it documented "three folders, each a synchronized group", which is now four.

🤖 Generated with Claude Code

Base automatically changed from fill-in-the-translations to main August 16, 2026 15:07
The app folders have been synchronized groups for a while, so adding a source
file to the app takes no project edit. The test folder was still a hand written
list, and every test or sample document we added cost four lines of made up
object ids in project.pbxproj. Making it a synchronized group too ends that.

Two things had to move out of the folder first, because a synchronized group
copies everything left in it into the bundle: the fixture generator, now in
scripts/, and Info.plist, which held nothing but build setting placeholders and
is better generated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xryx81PvamT674wzzQujjg
@andiwand
andiwand force-pushed the sync-the-test-folder branch from 9caa01b to 1ddc055 Compare August 16, 2026 15:09
@andiwand
andiwand merged commit 1a1c7f7 into main Aug 16, 2026
4 checks passed
@andiwand
andiwand deleted the sync-the-test-folder branch August 16, 2026 15:49
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.

1 participant