You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(platform-apple): one simctl --set builder and one simulator state parser #2794
The simctl device-set prefix is built in seven places, and two of them bypass the shared helper (line references at 01328de411, paths under packages/platform-apple/src/):
Device-set prefix builders:
core/simctl.ts:10 (the canonical one)
simulator-state.ts:34
simulator-inventory.ts:30
logs/log-predicate.ts:28
core/apps-simctl.ts:5
network/runtime.ts:91-92 (inline)
logs/start.ts:177 (inline)
Duplicate helpers:runSimctl and runSimctlForDevice do the same thing, and screenshot.ts:88-90 and screenshot-status-bar.ts:58-60 add two more thin shims.
Parsers of simctl list devices -j:core/simulator.ts:257-279 and simulator-state.ts:4-32 are true duplicates. snapshot-target.ts:112-140 and simulator-inventory.ts:28-56 produce intentionally different projections.
Required behavior
One simctl argv/set-prefix builder, the one in core/simctl.ts. Every call site uses it or runSimctlForDevice.
One simctl command runner. Delete the alias and the shims.
Merge the two duplicate state parsers into one. Leave the target and inventory projections separate; they may share a raw-JSON reader.
No argv changes. Existing argv assertions stay green without edits, apart from import paths.
Completion conditions
git grep -n "'--set'" packages/platform-apple/src finds only core/simctl.ts in production files.
pnpm check:affected --run, pnpm check:production-exports and pnpm check:fallow are green.
Dependencies
Do this after #2784 (the simctl spawn --set bug), or together with it.
Activity