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
Commit cdfbad6
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(ios): brand the simctl builders and require the brand where runXcrun runs simctl (#2917)
* refactor(platform-apple): brand the simctl command that runXcrun runs
buildSimctlArgsForAddress and buildSimctlArgsForDevice now return a
ScopedSimctlCommand, minted in core/tool-provider.ts from set-scoped
arguments. runXcrun takes that command or an argv whose tool is a named
non-simctl tool (devicectl, xcdevice, xctrace), so a literal, const-held,
string-typed or copied simctl argv is a type error. The simctl branch
unwraps the command to its scoped arguments; the ScopedSimctlArgs double
cast is gone.
The Apple tool host hands a simctl request's scoped args straight to the
simctl provider. The set-scope primitive is private to core/simctl.ts;
doctor and inventory use the named mints simctlAvailabilityProbeArgs and
simctlListDevicesArgs. Every argv stays byte-identical.
Refs #2878
* chore(gates): narrow R79 to the simctl bypasses tsc cannot reject
Drop the '--set' literal ban, the global ArrayExpression clause, the
set-scope identifier check and the tool-provider argv exemption. R79 now
checks the argv at an xcrun invocation (a call with an 'xcrun' argument
or an executable: 'xcrun' spec), which must name its tool as a literal
other than simctl, and refuses casts to the scope brands outside the two
modules that mint them.
Refs #2878
* chore(gates): refuse a simctl argv array outside the brand mints however it reaches an executor
runCmd, runCmdBackground and an executable: 'xcrun' spec take any string
argv, so the runXcrun brand does not reach them. R79 again flags every
array whose first element names simctl (literal, quasi-only template, or
a same-file binding of either) outside core/simctl.ts and
core/tool-provider.ts, so a variable-held, aliased or spread simctl argv
fails the gate as the inline form does.
* refactor(platform-apple): run every simctl executor through one argv form
* chore(gates): refuse a simctl tool named after leading xcrun options
0 commit comments