Commit 7e7d721
committed
feat(spm): auto-sync detects added/removed native source files
The Xcode auto-sync build phase previously only watched package.json,
react-native.config.js, lockfiles, and node_modules mtimes. Adding or
removing a source file inside an spm.modules entry or an autolinked
dep was invisible — adds were silently skipped (missing from the
sources: allowlist) and removes broke the build (allowlist pointed at
a vanished file).
The autolinker now emits build/generated/autolinking/.spm-sync-watch-paths,
a deduped list of every module's source dir it consumed. The build-phase
shell extends its staleness checks with `find -newer "$STAMP"` against
each watched dir. POSIX directory mtimes update on both add and remove,
so a single check covers both cases. Sub-millisecond per dir; the
fast path is unchanged when nothing has changed.
When triggered, the existing sync runs the autolinker, which regenerates
the wrapper Package.swift files and their sources: allowlists.1 parent 3e6384e commit 7e7d721
2 files changed
Lines changed: 28 additions & 0 deletions
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1299 | 1313 | | |
1300 | 1314 | | |
1301 | 1315 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
635 | 649 | | |
636 | 650 | | |
637 | 651 | | |
| |||
0 commit comments