Skip to content

sdk: prune Xcode when installing from xip - #280

Merged
kabiroberai merged 1 commit into
mainfrom
prune-xip
Sep 23, 2026
Merged

kabiroberai merged 1 commit into
mainfrom
prune-xip

Conversation

@kabiroberai

@kabiroberai kabiroberai commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

We only need Xcode.app/Contents/{Info.plist,version.plist,Developer} for the SDK (and expect that to continue being the case). We already delete other directories when using xtool sdk install Xcode.app but we weren't doing this on xtool sdk install Xcode.xip. Prune on the xip path as well.

Also prune on update (and bump the SDK epoch) so that existing users benefit from this.

How was it tested?

  • Install SDK from xip, confirm Xcode.app/Contents only contains those three things
  • Install SDK from app, confirm Xcode.app/Contents only contains those three things + we don't modify the original app
  • Build SDK from app (xtool sdk build Xcode.app), confirm we don't clobber the input Xcode app
  • Update SDK, confirm that extra contents are removed
  • SDK auto-updates after updating xtool binary

AI tool usage

How much of this PR was AI-assisted? (check one)

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

Summary by CodeRabbit

  • Bug Fixes
    • SDK builds from Xcode app and XIP inputs now check for required Xcode components before installation. Missing components produce an error.
    • Extra direct items in Xcode’s Contents folder are removed during XIP builds and app updates. Slim builds remain unchanged.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 61ef9a96-b4ee-4853-822a-c8365dbca930

📥 Commits

Reviewing files that changed from the base of the PR and between a07b730 and 9d9e41b.

📒 Files selected for processing (1)
  • Sources/XToolSupport/SDKBuilder.swift

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

SDKBuilder now centralizes the required Xcode app contents and cleans selected Xcode app inputs before SDK installation. The SDK epoch increases from 2 to 3. App slim-build inputs remain unchanged.

Changes

Xcode SDK input handling

Layer / File(s) Summary
Validate and clean Xcode app inputs
Sources/XToolSupport/SDKBuilder.swift
SDKBuilder uses a shared list of required Contents entries for normal builds and cleanup. Cleanup reports missing entries and removes other direct children for XIP normal builds and app updates. App slim builds do not clean their inputs. The SDK epoch increases to 3.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 9d9e4

No actionable issue is established that would prevent merging after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: pruning Xcode when installing from an XIP archive. It is concise and specific.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kabiroberai
kabiroberai marked this pull request as ready for review September 23, 2026 03:22
@kabiroberai
kabiroberai merged commit f9706d9 into main Sep 23, 2026
12 checks passed
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.

1 participant