Copy asset catalogs into an Xcode worker.

actool does not follow a symlinked .xcassets, so the worker build fails
with a missing AppIcon and a mutant that still compiles is reported
killed. Copy the catalog, including resources that were themselves
links, and keep linking other files.

Proved by the worker overlay test and a stand-in xcodebuild that
rejects a symlinked catalog. 127 passed, 1 skipped.

Co-authored-by: Robert C. Martin <[email protected]>
This commit is contained in:
Cursor Agent
2026-11-26 02:49:35 +00:00
co-authored by Robert C. Martin
parent b1d53b0085
commit 0cfa995431
3 changed files with 130 additions and 9 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ Exit `0` when every executed mutant was killed. Exit `2` when the baseline tests
Mutants of one file run at the same time. The default is one worker per core. `--max-workers` sets the cap. The run uses the smaller of that cap, the number of cores, and the number of selected sites. Files are still taken one at a time.
Each worker is a directory under `target/mutation-workers`. The file being mutated is a private copy. A module that reaches that file through a relative import is copied too, so Node resolves the import to the private copy. The rest of the tree is linked. The original files stay as they are. The overlay is removed when that file's mutants finish.
Each worker is a directory under `target/mutation-workers`. The file being mutated is a private copy. A module that reaches that file through a relative import is copied too, so Node resolves the import to the private copy. The rest of the tree is linked. An Xcode project, workspace, or asset catalog is copied: xcodebuild realpaths a project symlink, and actool will not follow a symlinked catalog. The original files stay as they are. The overlay is removed when that file's mutants finish.
The baseline still runs once, in the real tree, before any worker starts. The mutant command then runs inside the worker, in the same directory it would have used in the real tree, so a relative path such as `src` or `./pkg` refers to the overlay. A copy left under `target/mutator-backup/` by an interrupted older run is restored before a non-scan run.