Skip to content

fix(cli): Suppress false compiler errors in test summaries#387

Merged
cameroncooke merged 2 commits intomainfrom
cameroncooke/fix/xcodebuild-compiler-error-snapshots
May 1, 2026
Merged

fix(cli): Suppress false compiler errors in test summaries#387
cameroncooke merged 2 commits intomainfrom
cameroncooke/fix/xcodebuild-compiler-error-snapshots

Conversation

@cameroncooke
Copy link
Copy Markdown
Collaborator

Fix false compiler-error sections in CLI test summaries when xcodebuild emits noisy NSError dump lines.

The parser previously treated embedded Objective-C selector labels such as pid:error:, as build diagnostics, which could turn simulator launch-service noise into a buffered compiler error. The CLI renderer could then flush that buffered error after a successful test summary, producing contradictory output.

This tightens build-error classification, aligns streaming finalization with successful summaries, and adds compiler-error snapshot coverage for simulator, device, and macOS build-style flows across CLI, MCP, and JSON output. The snapshot tests temporarily patch fixture source files and restore the original contents in finally; snapshot execution is configured serially via vitest.snapshot.config.ts.

Fixes #383

Tighten xcodebuild diagnostic detection so Objective-C selector labels in
NSError dump lines are not treated as compiler errors. Align CLI streaming
finalization so buffered compiler diagnostics do not print after a successful
summary.

Add compiler-error snapshot coverage for simulator, device, and macOS build,
build-and-run, and test flows across CLI, MCP, and JSON output.

Fixes #383
Co-Authored-By: Codex <noreply@openai.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 1, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@387

commit: b7e9813

@cameroncooke cameroncooke marked this pull request as ready for review May 1, 2026 17:51
Comment thread src/snapshot-tests/suites/helpers.ts Outdated
Trigger compiler-error snapshot cases with a guarded Swift compile flag
instead of patching example project files during test execution. This keeps
snapshot tests deterministic and avoids leaving tracked source files corrupted
if a run is interrupted.

Refs GH-387
Co-Authored-By: Codex <codex@openai.com>
@cameroncooke cameroncooke merged commit 1d9bfc0 into main May 1, 2026
41 checks passed
@cameroncooke cameroncooke deleted the cameroncooke/fix/xcodebuild-compiler-error-snapshots branch May 1, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI test summary reports false-positive errors from xcodebuild's NSError dictionary dump

1 participant