( executor: CommandExecutor, prepared?: PreparedBuildSimExecution, )
| 157 | } as const); |
| 158 | |
| 159 | export 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 | |
| 199 | export async function build_simLogic( |
| 200 | params: BuildSimulatorParams, |
no test coverage detected