perf: fast-path macos device resolution#525
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68bdb7d809
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (shouldUseHostMacFastPath(selector)) { | ||
| return cacheResolvedTargetDevice( | ||
| cacheKey, | ||
| await resolveDevice([buildHostMacDevice()], selector), |
There was a problem hiding this comment.
Preserve macOS host guard on non-Darwin
When --platform macos or --platform apple --target desktop is resolved on a Linux/Windows host, this fast path now returns a synthetic macOS device before reaching listAppleDevices, bypassing the existing process.platform !== 'darwin' UNSUPPORTED_PLATFORM check. That makes non-macOS environments believe the local host is a usable Mac and defers failure to later macOS-helper/runner calls with less accurate behavior; gate this fast path on process.platform === 'darwin' or keep the platform check in the macOS device builder.
Useful? React with 👍 / 👎.
68bdb7d to
ae9ce13
Compare
500c922 to
48d6f25
Compare
64c2c6f to
87b66d3
Compare
48d6f25 to
6874af1
Compare
|
87b66d3 to
9db8993
Compare
Summary
Fast-path explicit macOS desktop device resolution.
Adds a macOS device-list helper, preserves selector validation on the fast path, and keeps simulator-set parity in the resolver call. Behavior note: explicit
--platform macos/ Apple desktop resolution now validates the host target directly instead of surfacing missing Apple mobile tooling errors fromxcrunprobes.Validation
pnpm exec vitest run src/core/__tests__/dispatch-resolve.test.tspnpm check:fallow --base 6874af189dba6261efaff1f0463f6fada3372f1epnpm check:quickpnpm check:unit