Skip to content

fix(ci): fetch Python.xcframework in ci_post_clone (Xcode Cloud build fix)#88

Merged
torlando-tech merged 2 commits into
mainfrom
fix/ci-fetch-python-xcframework
Jun 1, 2026
Merged

fix(ci): fetch Python.xcframework in ci_post_clone (Xcode Cloud build fix)#88
torlando-tech merged 2 commits into
mainfrom
fix/ci-fetch-python-xcframework

Conversation

@torlando-tech

Copy link
Copy Markdown
Owner

Problem

Xcode Cloud builds fail after the dual-backend merge.

Root cause

The embedded-Python dependency landed in 2e49820 (dual-backend PR 1/3), which also updated ci_post_clone.sh to fetch the iOS wheels — but not the Python.xcframework itself.

  • Frameworks/Python.xcframework/ is gitignored (too large for git; fetched by support/fetch-python.sh).
  • The Columba target links Python.xcframework (14 references in the pbxproj), and no build phase fetches it.
  • So a fresh Xcode Cloud clone has no framework to link against → build fails.

GitHub Actions doesn't hit this because its workflow fetches the framework separately; only the Xcode Cloud path was missing it.

Fix

Fetch the framework in ci_post_clone.sh alongside the wheels, with the same idempotent "skip if present" guard. fetch-python.sh is a plain curl + tar of the pinned BeeWare 3.13-b13 release (no host toolchain needed); the asset currently returns HTTP 200.

Verification

  • bash -n ci_scripts/ci_post_clone.sh
  • Pinned BeeWare release asset reachable (HTTP 200) ✅
  • Local framework already at b13, so the guard correctly skips on incremental/local runs ✅

Note: I diagnosed this from the build wiring, not the Xcode Cloud log (no ASC API key available here). This is a real, build-breaking gap regardless. If a build still fails after this lands, the next suspect is the Xcode version — the embedded Python clang module map needs Xcode 26 (the same reason GitHub Actions moved to macos-26); verify the Xcode Cloud workflow's Xcode version.

The dual-backend merge (2e49820) introduced the embedded-Python dependency
and taught the Xcode Cloud post-clone hook to fetch the iOS *wheels* -- but
not the Python.xcframework itself. The framework is gitignored (too large for
git) and the Columba target links it, so a fresh Xcode Cloud clone has nothing
to link against and the build fails.

Fetch it in post-clone alongside the wheels, mirroring the same idempotent
guard. fetch-python.sh is a plain curl+tar of a pinned BeeWare release (no host
toolchain required); the pinned 3.13-b13 asset returns 200.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes a missing step in the Xcode Cloud post-clone hook: Python.xcframework is gitignored but linked by the Columba target, so fresh CI clones had nothing to link against. The fix adds a call to support/fetch-python.sh, which already contains its own version-aware idempotency check (Frameworks/VERSIONS vs. pinned build tag), so calling it unconditionally is the right approach — it avoids duplicating the version pin and correctly handles stale-version upgrades that a directory-existence outer guard would mask.

  • Adds \"$REPO_ROOT/support/fetch-python.sh\" called unconditionally in ci_post_clone.sh, placed before the wheels fetch.
  • Removes the need for an outer guard by relying on fetch-python.sh's built-in idempotency, which bails early when Frameworks/VERSIONS already matches the pinned b13 build.

Confidence Score: 5/5

Safe to merge — the change adds a single, well-scoped call to an existing idempotent script, closing a real build gap without touching any product code.

The fix is minimal and correct: fetch-python.sh already handles version checking and idempotency internally, so calling it unconditionally is the right design. The comment in the new code clearly explains the reasoning. No product code is touched, no new external dependencies are introduced, and the script-level error propagation (set -euo pipefail) remains intact throughout.

No files require special attention.

Important Files Changed

Filename Overview
ci_scripts/ci_post_clone.sh Adds an unconditional call to support/fetch-python.sh before the wheels fetch, delegating idempotency to the inner script's version-aware guard rather than a coarser directory-existence check.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ci_post_clone.sh starts] --> B[Rewrite MARKETING_VERSION & BUILD_NUMBER in pbxproj]
    B --> C["Call support/fetch-python.sh (unconditional)"]
    C --> D{Frameworks/VERSIONS\nmatches pinned b13?}
    D -- Yes --> E[Skip — nothing to fetch]
    D -- No --> F[curl BeeWare release tarball]
    F --> G[Remove stale Python.xcframework]
    G --> H[tar extract into Frameworks/]
    H --> I[Python.xcframework ready]
    E --> J{wheels-iphoneos &\nwheels-iphonesimulator present?}
    I --> J
    J -- Yes --> K[Skip wheels fetch]
    J -- No --> L[Call support/fetch-wheels.sh]
    L --> M[Wheels ready]
    K --> N[done.]
    M --> N
Loading

Reviews (2): Last reviewed commit: "address greptile review feedback (greplo..." | Re-trigger Greptile

Comment thread ci_scripts/ci_post_clone.sh Outdated
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Drop the directory-existence guard around fetch-python.sh and call it
unconditionally. fetch-python.sh is already version-aware (bails on a matching
Frameworks/VERSIONS, re-fetches when stale/missing), so the outer guard only
masked stale-version upgrades. Calling it directly also avoids duplicating the
pinned build tag in a second place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@torlando-tech torlando-tech merged commit 3d7736c into main Jun 1, 2026
3 checks passed
@torlando-tech torlando-tech deleted the fix/ci-fetch-python-xcframework branch June 1, 2026 05:54
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