← Back to Pull requests

Transpile instead of building the host project in skip export #295

Closed
unknown closed this pull request without merging on Oct 13, 2026 18:55 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 20:36 UTC
Author

Why

skip export ran swift build on the host (--triple arm64-apple-ios on macOS, the host triple on Linux) only so that SwiftPM would run the skipstone build plugin. None of that compiled code ends up in the exported artifacts. The Kotlin comes from the transpiled sources, and the native libraries come from the Android build that Gradle runs. For library exports this host build was the single biggest step after the Android build.

Change

ExportCommand now runs the skip-transpile command plugin from skiptools/skip#745 instead of the host build:

swift package --disable-sandbox --allow-writing-to-package-directory skip-transpile --outputs <project>/.build/plugins/outputs --target <module>…

If the project's skip package predates the plugin, SwiftPM reports Unknown subcommand or plugin name. The export then prints a warning and falls back to the previous host build, so older projects keep exporting and still exit 0. --no-build is unchanged.

A new --host-build <mode> option chooses between the two: transpile (the default) does the above, and full runs the previous host build, for any project where transpiling alone causes problems:

skip export --host-build full

Behavior change

  • No host type-check by default. With --host-build transpile, the export no longer type-checks the package for the host; --host-build full restores it. Swift errors in native modules still surface in the Android build. Errors in transpiled modules surface when the Kotlin compiles, or in Xcode, as they would during development.

  • App exports keep the host build for now. The Gradle settings still run skip plugin --prebuild, which builds the host. Measured below, app exports don't regress. Having the prebuild use skip-transpile as well is a natural follow-up.
  • Testing

    All runs on an M-series Mac, 14 cores, Swift 6.4, Swift Build. Stock 1.9.13 and this branch were run alternately on the same tree.

  • Library export of a production Skip Fuse app, 16 Skip modules (skip export --module App --no-export-project --debug --arch aarch64, native Android build on). Each run followed a public API change in a low-level module:
  • | | Run 1 | Run 2 |
    |---|---|---|
    | Stock 1.9.13 | 134.0 s | 138.5 s |
    | This branch | 108.5 s | 100.3 s |

    The host build step (40–44 s) became a 6–10 s transpile. All 16 AARs contain compiled classes, and the root AAR has its 29 native libraries.

  • App export of a skip init --native-app --native-model project (--no-ios --debug --arch aarch64). The APK, AAB and project zip were all exported:
  • | | Run 1 | Run 2 |
    |---|---|---|
    | Stock 1.9.13 | 46.0 s | 34.7 s |
    | This branch | 36.8 s | 33.3 s |

  • Fallback against the stock 1.9.13 skip package: one warning, then the host build. The export succeeds and exits 0.

  • Not tested: Linux, the iOS .ipa part of app exports, and the skipstone test suite.
  • 🤖 Generated with Claude Code

    Diff: 374 lines (+280 / -94) across 4 files Reviewer: marcprux Review duration: 8539m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 374 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.355
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #295"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.9% (MEDIUM) · Higher = larger blast radius
    42.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%