MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / createBuildSimExecutor

Function createBuildSimExecutor

src/mcp/tools/simulator/build_sim.ts:159–197  ·  view source on GitHub ↗
(
  executor: CommandExecutor,
  prepared?: PreparedBuildSimExecution,
)

Source from the content-addressed store, hash-verified

157} as const);
158
159export function createBuildSimExecutor(
160 executor: CommandExecutor,
161 prepared?: PreparedBuildSimExecution,
162): StreamingExecutor<BuildSimulatorParams, BuildSimulatorResult> {
163 return async (params, ctx) => {
164 const resolved = prepared ?? (await prepareBuildSimExecution(params, executor));
165
166 if (resolved.warningMessage) {
167 log('warn', resolved.warningMessage);
168 ctx.emitFragment({
169 kind: 'build-result',
170 fragment: 'warning',
171 message: resolved.warningMessage,
172 });
173 }
174
175 const started = createDomainStreamingPipeline('build_sim', 'BUILD', ctx, 'build-result');
176 const buildResult = await executeXcodeBuildCommand(
177 resolved.sharedBuildParams,
178 resolved.platformOptions,
179 params.preferXcodebuild ?? false,
180 'build',
181 executor,
182 undefined,
183 started.pipeline,
184 );
185
186 return createBuildDomainResult({
187 started,
188 succeeded: !buildResult.isError,
189 target: 'simulator',
190 artifacts: {
191 buildLogPath: started.pipeline.logPath,
192 },
193 fallbackErrorMessages: collectFallbackErrorMessages(started, [], buildResult.content),
194 request: resolved.invocationRequest,
195 });
196 };
197}
198
199export async function build_simLogic(
200 params: BuildSimulatorParams,

Callers 1

build_simLogicFunction · 0.85

Calls 7

logFunction · 0.90
executeXcodeBuildCommandFunction · 0.90
createBuildDomainResultFunction · 0.90
prepareBuildSimExecutionFunction · 0.85
emitFragmentMethod · 0.65

Tested by

no test coverage detected