Repository navigation
Commit 3946d4d
Run each copy's patch engine behind a pointer, so the in-process gem tests fit their stack on Windows (#2432)
* Run each copy's patch engine behind a pointer
The in-process tests run a command on a libtest thread, which has a
2 MiB stack. The deepest chain there is scan -> the nested apply ->
apply_gem_package_patch -> apply_package_patch -> the store-copy fan-out
-> the engine. Every async fn on that chain awaits apply_package_patch
inline, and a debug build keeps room for the awaited future in the
caller's poll frame at each call site. The engine's future is the
largest of them, so every caller up to the command carried it.
apply_package_patch, rollback_package_patch and
rollback_store_copies_holding_patch now build the per-copy engine
future through a non-inlined boxed(), so their own futures hold a
pointer. No behaviour changes.
On macOS (arm64, debug) the smallest stack that
remove_base_purl_clears_all_platforms_and_rolls_back of
in_process_gem_multi_platform passes with goes from 1972 KiB to
1500 KiB. On Windows that test overflowed the stack on a branch that
adds nothing to the chain beyond current main.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Point the two boxed helpers at each other
Core's boxed (for the patch engines) and the CLI's (for its command
frames) are the same helper but for a Send bound. Each doc comment now
names the other, so a change to one is made to both.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>1 parent 762cec2 commit 3946d4d
3 files changed
Lines changed: 45 additions & 4 deletions
File tree
- crates
- socket-patch-cli/src
- socket-patch-core/src/patch
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
1634 | 1638 | | |
1635 | 1639 | | |
1636 | 1640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
987 | 1013 | | |
988 | 1014 | | |
989 | 1015 | | |
| |||
1761 | 1787 | | |
1762 | 1788 | | |
1763 | 1789 | | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
1764 | 1793 | | |
1765 | | - | |
| 1794 | + | |
| 1795 | + | |
1766 | 1796 | | |
1767 | 1797 | | |
1768 | 1798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
397 | 399 | | |
398 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
399 | 404 | | |
400 | 405 | | |
401 | 406 | | |
| |||
432 | 437 | | |
433 | 438 | | |
434 | 439 | | |
435 | | - | |
436 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
437 | 444 | | |
438 | 445 | | |
439 | 446 | | |
| |||
0 commit comments