Transpile instead of building the host project in skip export #295
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
marcprux
Why
skip exportranswift buildon the host (--triple arm64-apple-ioson 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
ExportCommandnow runs theskip-transpilecommand plugin from skiptools/skip#745 instead of the host build: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-buildis unchanged.A new
--host-build <mode>option chooses between the two:transpile(the default) does the above, andfullruns the previous host build, for any project where transpiling alone causes problems:Behavior change
--host-build transpile, the export no longer type-checks the package for the host;--host-build fullrestores 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.skip plugin --prebuild, which builds the host. Measured below, app exports don't regress. Having the prebuild useskip-transpileas 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.
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.
skip init --native-app --native-modelproject (--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 |
.ipapart of app exports, and the skipstone test suite.🤖 Generated with Claude Code