Skip to content

fix(build): Delegate incremental state to xcodemake#485

Draft
cameroncooke wants to merge 6 commits into
mainfrom
codex/fix-xcodemake-log-path
Draft

fix(build): Delegate incremental state to xcodemake#485
cameroncooke wants to merge 6 commits into
mainfrom
codex/fix-xcodemake-log-path

Conversation

@cameroncooke

@cameroncooke cameroncooke commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Incremental builds now use the repaired xcodemake fork when DerivedData is an external absolute path, instead of failing while constructing a capture-log filename. The dependency remains pinned by commit and checksum.

XcodeBuildMCP delegates Makefile reuse, argument changes, and project freshness decisions to xcodemake on every incremental call. This removes the unsafe local shortcut where a retained historical log could select a global Makefile generated for different arguments.

The pin now includes the lifecycle fixes merged in cameroncooke/xcodemake#3: Makefile reuse checks no longer regenerate on every invocation, and both -config and -configuration remain stable through capture and direct fallback.

Regression coverage executes the exact checksum-verified pinned Perl wrapper with hermetic fake build tools and verifies initial capture, matching reuse without Makefile regeneration, changed-argument recapture, project-newer-than-log recapture, long-form configuration preservation, and direct fallback.

Fixes #466.

Update the pinned xcodemake revision so absolute DerivedData paths produce safe capture log filenames. Match the new logs by their argument hash before deciding whether to run make directly.

Fixes #466
Always invoke the pinned wrapper so it owns Makefile argument and freshness validation before delegating to make.

Refs #466
Execute the checksum-verified pinned wrapper with fake build tools and verify capture, reuse, argument invalidation, and project freshness behavior.

Refs #466
Copilot AI review requested due to automatic review settings July 21, 2026 18:26
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: e25a539

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates XcodeBuildMCP’s incremental-build path to always invoke the pinned xcodemake wrapper (instead of locally deciding when to run make), and refreshes the pinned wrapper commit/checksum to address failures when -derivedDataPath is an absolute external path.

Changes:

  • Updated the pinned xcodemake commit + SHA-256, and added a checksum-verified fixture plus a wrapper lifecycle regression test.
  • Simplified incremental build execution to always route through xcodemake, delegating Makefile reuse / invalidation decisions to the wrapper.
  • Added unit coverage ensuring executeXcodeBuildCommand delegates to xcodemake (via mocking) for external absolute DerivedData paths, and recorded the fix in the changelog.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/xcodemake.ts Updates the pinned xcodemake commit/checksum and keeps download + integrity verification flow.
src/utils/build-utils.ts Removes local Makefile/log heuristics and always runs xcodemake for incremental builds.
src/utils/tests/xcodemake.test.ts Drops coverage for removed local log-file detection helper.
src/utils/tests/xcodemake-wrapper.test.ts Adds an execution-based regression test for the pinned wrapper behavior using hermetic fake build tools.
src/utils/tests/fixtures/xcodemake/xcodemake-7d20… Adds the exact pinned wrapper script as a fixture for checksum-verified regression execution.
src/utils/tests/fixtures/xcodemake/README.md Documents fixture pinning and checksum requirements.
src/utils/tests/build-utils-xcodemake.test.ts Adds a focused unit test verifying build-utils always delegates incremental builds to xcodemake.
CHANGELOG.md Adds an Unreleased entry for the incremental xcodemake absolute DerivedData fix (Issue #466).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Repin the bundled wrapper to the upstream lifecycle fixes and add regression coverage for long configuration arguments, direct fallback, and Makefile reuse.
Copilot AI review requested due to automatic review settings July 21, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread src/utils/__tests__/xcodemake-wrapper.test.ts
Keep the wrapper lifecycle test independent of the process working directory.
Copilot AI review requested due to automatic review settings July 21, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread src/utils/__tests__/xcodemake-wrapper.test.ts Outdated
Compare the observed Makefile timestamp with the explicit sentinel using a filesystem-resolution tolerance.
Copilot AI review requested due to automatic review settings July 21, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread src/utils/build-utils.ts
Comment on lines +181 to +185
result = await executeXcodemakeCommand(
projectDir,
command.slice(1),
platformOptions.logPrefix,
);
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.

[Bug]:  xcodemake incremental builds fails

2 participants